mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-03-06 22:39:41 +08:00
Fixed reset action docs (#157)
- Added the index - Actions is now an array Related to https://github.com/react-community/react-navigation/issues/59#issuecomment-276972783
This commit is contained in:
committed by
Eric Vicenti
parent
a64eb46c9c
commit
8bbe951e5b
@@ -127,9 +127,14 @@ The `Reset` action wipes the whole navigation state and replaces it with the res
|
||||
```js
|
||||
import { NavigationActions } from 'react-navigation'
|
||||
|
||||
NavigationActions.reset({
|
||||
actions: NavigationActions.navigate({ routeName: 'Profile'}),
|
||||
const resetAction = NavigationActions.reset({
|
||||
index: 0,
|
||||
actions: [
|
||||
NavigationActions.navigate({ routeName: 'Profile'})
|
||||
]
|
||||
})
|
||||
this.props.navigation.dispatch(resetAction)
|
||||
|
||||
```
|
||||
|
||||
### SetParams
|
||||
|
||||
Reference in New Issue
Block a user