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:
Matteo Mazzarolo
2017-02-02 17:40:02 +01:00
committed by Eric Vicenti
parent a64eb46c9c
commit 8bbe951e5b

View File

@@ -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