|
@@ -45,21 +45,23 @@ Pop all the screens until the root from this screen's navigation stack.
|
45
|
45
|
Navigation.popToRoot(this.props.componentId);
|
46
|
46
|
```
|
47
|
47
|
|
48
|
|
-<!-- ## resetTo(params)
|
|
48
|
+## setRootStack(componentId, params)
|
49
|
49
|
|
50
|
|
-Reset the screen's navigation stack to a new screen (the stack root is changed).
|
|
50
|
+Reset the current navigation stack to a new screen component (the stack root is changed).
|
51
|
51
|
|
52
|
52
|
```js
|
53
|
|
-this.props.navigator.resetTo({
|
54
|
|
- screen: 'example.ScreenThree', // unique ID registered with Navigation.registerScreen
|
55
|
|
- title: undefined, // navigation bar title of the pushed screen (optional)
|
56
|
|
- passProps: {}, // simple serializable object that will pass as props to the pushed screen (optional)
|
57
|
|
- animated: true, // does the resetTo have transition animation or does it happen immediately (optional)
|
58
|
|
- animationType: 'fade', // 'fade' (for both) / 'slide-horizontal' (for android) does the resetTo have different transition animation (optional)
|
59
|
|
- navigatorStyle: {}, // override the navigator style for the pushed screen (optional)
|
60
|
|
- navigatorButtons: {} // override the nav buttons for the pushed screen (optional)
|
|
53
|
+Navigation.setRootStack(this.props.componentId, {
|
|
54
|
+ component: {
|
|
55
|
+ name: 'example.NewRootScreen',
|
|
56
|
+ passProps: {
|
|
57
|
+ text: 'Root screen'
|
|
58
|
+ },
|
|
59
|
+ options: {
|
|
60
|
+ animated: true // Will animate root change same as push
|
|
61
|
+ }
|
|
62
|
+ }
|
61
|
63
|
});
|
62
|
|
-``` -->
|
|
64
|
+```
|
63
|
65
|
|
64
|
66
|
## showModal(layout = {})
|
65
|
67
|
|