mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-04-23 20:10:49 +08:00
Add onNavigationStateChange (#453)
* Support * Revert consoleg * Add very bad doc * Improve docs * Surpress flow
This commit is contained in:
committed by
Eric Vicenti
parent
71e8c95b34
commit
26b165200f
@@ -48,10 +48,14 @@ When rendering one of the included navigators, the navigation prop is optional.
|
||||
|
||||
For the purpose of convenience, the built-in navigators have this ability because behind the scenes they use `createNavigationContainer`. Usually, navigators require a navigation prop in order to function.
|
||||
|
||||
### `onNavigationStateChange(prevState, newState)`
|
||||
|
||||
Sometimes it is useful to know when navigation state managed by the top-level navigator changes. For this purpose, this function gets called every time with the previous state and the new state of the navigation.
|
||||
|
||||
### `containerOptions`
|
||||
|
||||
These options can be used to configure a navigator when it is used at the top level.
|
||||
|
||||
An error will be thrown if a navigator is configured with `containerOptions` and also receives a `navigation` prop, because in that case it would be unclear if the navigator should handle its own state.
|
||||
|
||||
- `URIPrefix` - The prefix of the URIs that the app might handle. This will be used when handling a [deep link](/docs/guides/linking) to extract the path passed to the router.
|
||||
- `URIPrefix` - The prefix of the URIs that the app might handle. This will be used when handling a [deep link](/docs/guides/linking) to extract the path passed to the router.
|
||||
Reference in New Issue
Block a user