react-navigation / react-navigation/react-navigation.github.io
Documentation missing for canGoBack()
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 324
- Forks
- 2k
- PR merge metrics
- No merged PRs in 30d
Description
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.
Expected Behavior
Typing "canGoBack" in search field in the documentation should yield this result.
How to reproduce
- Open https://reactnavigation.org/docs
- 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().
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by searching the documentation for the existing references to canGoBack(), goBack(), pop(), jumpTo(), and popToTop(). Add a searchable canGoBack() entry explaining its availability and guarding purpose, with links to the related navigation methods; done means searching the documentation for canGoBack returns the new explanation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react, react-native
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100