|
|
|
|
1
|
# Top Level API
|
1
|
# Top Level API
|
2
|
|
2
|
|
3
|
-So as to make the navigation API as consistent and homogenous as possible, we begin with a single, unifying function -- setRoot -- that receives properties for any kind of layout, whether tabs or stacks.
|
|
|
|
|
3
|
+So as to make the navigation API as consistent and homogenous as possible, we begin with a single, unifying function -- setRoot. SetRoot receives properties for any kind of layout, whether tabs or stacks, or a combination of both (as seen in this example.)
|
4
|
|
4
|
|
5
|
See [Layout types](docs/layout-types)
|
5
|
See [Layout types](docs/layout-types)
|
6
|
|
6
|
|
|
|
|
|
50
|
|
50
|
|
51
|
## showOverlay(layout = {})
|
51
|
## showOverlay(layout = {})
|
52
|
|
52
|
|
53
|
-Show component as overlay.
|
|
|
|
|
53
|
+Shows a component as an overlay.
|
54
|
|
54
|
|
55
|
```js
|
55
|
```js
|
56
|
Navigation.showOverlay({
|
56
|
Navigation.showOverlay({
|
|
|
|
|
67
|
|
67
|
|
68
|
## dismissOverlay(componentId)
|
68
|
## dismissOverlay(componentId)
|
69
|
|
69
|
|
70
|
-Dismiss overlay matching the overlay componentId.
|
|
|
|
|
70
|
+Dismisses an overlay matching the given overlay componentId.
|
71
|
|
71
|
|
72
|
```js
|
72
|
```js
|
73
|
Navigation.dismissOverlay(this.props.componentId);
|
73
|
Navigation.dismissOverlay(this.props.componentId);
|
|
|
|
|
76
|
|
76
|
|
77
|
<!-- ## handleDeepLink(params = {})
|
77
|
<!-- ## handleDeepLink(params = {})
|
78
|
|
78
|
|
79
|
-Trigger a deep link within the app. See [deep links](https://wix.github.io/react-native-navigation/#/deep-links) for more details about how screens can listen for deep link events.
|
|
|
|
|
79
|
+Triggers a deep link within the app. See [deep links](https://wix.github.io/react-native-navigation/#/deep-links) for more details about how screens can listen for deep link events.
|
80
|
|
80
|
|
81
|
```js
|
81
|
```js
|
82
|
Navigation.handleDeepLink({
|
82
|
Navigation.handleDeepLink({
|
|
|
|
|
97
|
|
97
|
|
98
|
In some cases you might need the id of the currently visible screen. This method returns the unique id of the currently visible screen:
|
98
|
In some cases you might need the id of the currently visible screen. This method returns the unique id of the currently visible screen:
|
99
|
`const visibleScreenInstanceId = await Navigation.getCurrentlyVisibleScreenId()`
|
99
|
`const visibleScreenInstanceId = await Navigation.getCurrentlyVisibleScreenId()`
|
100
|
-In order to have any use of this method, you'd need to map instanceId to screens your self. -->
|
|
|
|
|
100
|
+In order to have any use of this method, you'd need to map instanceId to screens yourself. -->
|