react-navigation/rfcs

Improve ergonomics of back

brentvatne opened this issue · 1 comments

  • goBack() - no key passed in, defaults to the key for the current route
  • goBack(key) - go back from this key to the route before it
  • goBack(null) - let any navigator handle this back action - if the deepest active one is already on index 0, a parent will handle
  • dismiss() - goBack(key) where key is the key of the navigator itself

this is all a bit confusing, in particular when you want to deal with going back across navigators

Merged with #4 which was already talking about this