react-navigation / react-navigation/react-navigation.github.io

Documentation missing for canGoBack()

未關閉
#724 2 則留言 10 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

主要語言
JavaScript
星號
324
分支
2k
PR 合併指標
30 天內沒有已合併 PR

描述

Current Behavior

According to @satya164 in react-navigation/react-navigation#7814 we should use canGoBack() to guard against going back too much. If we don't, it'll result in a console.error() being emitted (red screen).

canGoBack is an undocumented feature. It's only mentioned in passing in the 'upgrading from 3.x' article where it's mentioned as a feature on the HeaderBackButton, however the function is (also?) available on the navigator object.

Screen Shot 2020-03-18 at 11 36 36

Expected Behavior
Typing "canGoBack" in search field in the documentation should yield this result.

How to reproduce

  1. Open https://reactnavigation.org/docs
  2. Type "canGoBack" in upper right search field

** Other comments **

It may make sense to reference the new documentation for canGoBack() in relation to goBack(), pop(), jumpTo(), and popToTop().

貢獻指南

這個儲存庫沒有索引到貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

首先在文件中搜尋對 canGoBack()、goBack()、pop()、jumpTo() 和 popToTop() 的現有參照。新增一個可搜尋的 canGoBack() 項目,說明其可用性和用於防護的目的,並附上相關導覽方法的連結;完成的標準是在文件中搜尋 canGoBack 時會傳回新的說明。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
javascript, react, react-native
領域
documentation
Issue 類型
文件
難度
2/5
預估耗時
1-3 小時
活躍度
停滯
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。