react-navigation.github.io icon indicating copy to clipboard operation
react-navigation.github.io copied to clipboard

Documentation missing for canGoBack()

Open scarlac opened this issue 5 years ago • 2 comments

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().

scarlac avatar Mar 18 '20 18:03 scarlac

thanks @scarlac, I'll check it

eriveltonelias avatar Mar 19 '20 10:03 eriveltonelias

took me a long time to be here, hope it could be documented soon

KingAmo avatar Aug 03 '20 07:08 KingAmo

hoping it comes soon

mksjohari avatar May 10 '21 06:05 mksjohari