|
@@ -3,32 +3,32 @@
|
3
|
3
|
# Navigation
|
4
|
4
|
|
5
|
5
|
* [Navigation](#Navigation)
|
6
|
|
- * [.registerContainer(containerName, getContainerFunc)](#Navigation+registerContainer)
|
|
6
|
+ * [.registerComponent(componentName, getComponentFunc)](#Navigation+registerComponent)
|
7
|
7
|
* [.setRoot(root)](#Navigation+setRoot)
|
8
|
8
|
* [.setDefaultOptions(options)](#Navigation+setDefaultOptions)
|
9
|
|
- * [.setOptions(containerId, options)](#Navigation+setOptions)
|
|
9
|
+ * [.setOptions(componentId, options)](#Navigation+setOptions)
|
10
|
10
|
* [.showModal(params)](#Navigation+showModal)
|
11
|
|
- * [.dismissModal(containerId)](#Navigation+dismissModal)
|
|
11
|
+ * [.dismissModal(componentId)](#Navigation+dismissModal)
|
12
|
12
|
* [.dismissAllModals()](#Navigation+dismissAllModals)
|
13
|
|
- * [.push(containerId, container)](#Navigation+push)
|
14
|
|
- * [.pop(containerId, params)](#Navigation+pop)
|
15
|
|
- * [.popTo(containerId)](#Navigation+popTo)
|
16
|
|
- * [.popToRoot(containerId)](#Navigation+popToRoot)
|
|
13
|
+ * [.push(componentId, component)](#Navigation+push)
|
|
14
|
+ * [.pop(componentId, params)](#Navigation+pop)
|
|
15
|
+ * [.popTo(componentId)](#Navigation+popTo)
|
|
16
|
+ * [.popToRoot(componentId)](#Navigation+popToRoot)
|
17
|
17
|
* [.events()](#Navigation+events)
|
18
|
18
|
|
19
|
19
|
|
20
|
20
|
* * *
|
21
|
21
|
|
22
|
|
-<a name="Navigation+registerContainer"></a>
|
|
22
|
+<a name="Navigation+registerComponent"></a>
|
23
|
23
|
|
24
|
|
-## navigation.registerContainer(containerName, getContainerFunc)
|
|
24
|
+## navigation.registerComponent(componentName, getComponentFunc)
|
25
|
25
|
Every screen component in your app must be registered with a unique name. The component itself is a traditional React component extending React.Component.
|
26
|
26
|
|
27
|
27
|
|
28
|
28
|
| Param | Type | Description |
|
29
|
29
|
| --- | --- | --- |
|
30
|
|
-| containerName | <code>string</code> | Unique container name |
|
31
|
|
-| getContainerFunc | <code>function</code> | generator function, typically `() => require('./myContainer')` |
|
|
30
|
+| componentName | <code>string</code> | Unique component name |
|
|
31
|
+| getComponentFunc | <code>function</code> | generator function, typically `() => require('./myComponent')` |
|
32
|
32
|
|
33
|
33
|
|
34
|
34
|
* * *
|
|
@@ -41,7 +41,7 @@ Reset the navigation stack to a new screen (the stack root is changed).
|
41
|
41
|
|
42
|
42
|
| Param | Type |
|
43
|
43
|
| --- | --- |
|
44
|
|
-| root | <a href="https://wix.github.io/react-native-navigation/v2/#/docs/Root">Root</a> |
|
|
44
|
+| root | <a href="https://wix.github.io/react-native-navigation/v2/#/docs/Root">Root</a> |
|
45
|
45
|
|
46
|
46
|
|
47
|
47
|
* * *
|
|
@@ -54,20 +54,20 @@ Set default options to all screens. Useful for declaring a consistent style acro
|
54
|
54
|
|
55
|
55
|
| Param | Type |
|
56
|
56
|
| --- | --- |
|
57
|
|
-| options | <a href="https://wix.github.io/react-native-navigation/v2/#/docs/options/NavigationOptions">NavigationOptions</a> |
|
|
57
|
+| options | <a href="https://wix.github.io/react-native-navigation/v2/#/docs/options/NavigationOptions">NavigationOptions</a> |
|
58
|
58
|
|
59
|
59
|
|
60
|
60
|
* * *
|
61
|
61
|
|
62
|
62
|
<a name="Navigation+setOptions"></a>
|
63
|
63
|
|
64
|
|
-## navigation.setOptions(containerId, options)
|
65
|
|
-Change a containers navigation options
|
|
64
|
+## navigation.setOptions(componentId, options)
|
|
65
|
+Change a components navigation options
|
66
|
66
|
|
67
|
67
|
|
68
|
68
|
| Param | Type | Description |
|
69
|
69
|
| --- | --- | --- |
|
70
|
|
-| containerId | <code>string</code> | The container's id. |
|
|
70
|
+| componentId | <code>string</code> | The component's id. |
|
71
|
71
|
| options | <a href="https://wix.github.io/react-native-navigation/v2/#/docs/options/NavigationOptions">NavigationOptions</a> | |
|
72
|
72
|
|
73
|
73
|
|
|
@@ -81,20 +81,20 @@ Show a screen as a modal.
|
81
|
81
|
|
82
|
82
|
| Param | Type |
|
83
|
83
|
| --- | --- |
|
84
|
|
-| params | <code>object</code> |
|
|
84
|
+| params | <code>object</code> |
|
85
|
85
|
|
86
|
86
|
|
87
|
87
|
* * *
|
88
|
88
|
|
89
|
89
|
<a name="Navigation+dismissModal"></a>
|
90
|
90
|
|
91
|
|
-## navigation.dismissModal(containerId)
|
92
|
|
-Dismiss a modal by containerId. The dismissed modal can be anywhere in the stack.
|
|
91
|
+## navigation.dismissModal(componentId)
|
|
92
|
+Dismiss a modal by componentId. The dismissed modal can be anywhere in the stack.
|
93
|
93
|
|
94
|
94
|
|
95
|
95
|
| Param | Type | Description |
|
96
|
96
|
| --- | --- | --- |
|
97
|
|
-| containerId | <code>string</code> | The container's id. |
|
|
97
|
+| componentId | <code>string</code> | The component's id. |
|
98
|
98
|
|
99
|
99
|
|
100
|
100
|
* * *
|
|
@@ -109,27 +109,27 @@ Dismiss all Modals
|
109
|
109
|
|
110
|
110
|
<a name="Navigation+push"></a>
|
111
|
111
|
|
112
|
|
-## navigation.push(containerId, container)
|
|
112
|
+## navigation.push(componentId, component)
|
113
|
113
|
Push a new screen into this screen's navigation stack.
|
114
|
114
|
|
115
|
115
|
|
116
|
116
|
| Param | Type | Description |
|
117
|
117
|
| --- | --- | --- |
|
118
|
|
-| containerId | <code>string</code> | The container's id. |
|
119
|
|
-| container | <a href="https://wix.github.io/react-native-navigation/v2/#/docs/Container">Container</a> | |
|
|
118
|
+| componentId | <code>string</code> | The component's id. |
|
|
119
|
+| component | <a href="https://wix.github.io/react-native-navigation/v2/#/docs/Component">Component</a> | |
|
120
|
120
|
|
121
|
121
|
|
122
|
122
|
* * *
|
123
|
123
|
|
124
|
124
|
<a name="Navigation+pop"></a>
|
125
|
125
|
|
126
|
|
-## navigation.pop(containerId, params)
|
127
|
|
-Pop a container from the stack, regardless of it's position.
|
|
126
|
+## navigation.pop(componentId, params)
|
|
127
|
+Pop a component from the stack, regardless of it's position.
|
128
|
128
|
|
129
|
129
|
|
130
|
130
|
| Param | Type | Description |
|
131
|
131
|
| --- | --- | --- |
|
132
|
|
-| containerId | <code>string</code> | The container's id. |
|
|
132
|
+| componentId | <code>string</code> | The component's id. |
|
133
|
133
|
| params | <code>*</code> | |
|
134
|
134
|
|
135
|
135
|
|
|
@@ -137,26 +137,26 @@ Pop a container from the stack, regardless of it's position.
|
137
|
137
|
|
138
|
138
|
<a name="Navigation+popTo"></a>
|
139
|
139
|
|
140
|
|
-## navigation.popTo(containerId)
|
141
|
|
-Pop the stack to a given container
|
|
140
|
+## navigation.popTo(componentId)
|
|
141
|
+Pop the stack to a given component
|
142
|
142
|
|
143
|
143
|
|
144
|
144
|
| Param | Type | Description |
|
145
|
145
|
| --- | --- | --- |
|
146
|
|
-| containerId | <code>string</code> | The container's id. |
|
|
146
|
+| componentId | <code>string</code> | The component's id. |
|
147
|
147
|
|
148
|
148
|
|
149
|
149
|
* * *
|
150
|
150
|
|
151
|
151
|
<a name="Navigation+popToRoot"></a>
|
152
|
152
|
|
153
|
|
-## navigation.popToRoot(containerId)
|
154
|
|
-Pop the container's stack to root.
|
|
153
|
+## navigation.popToRoot(componentId)
|
|
154
|
+Pop the component's stack to root.
|
155
|
155
|
|
156
|
156
|
|
157
|
157
|
| Param | Type |
|
158
|
158
|
| --- | --- |
|
159
|
|
-| containerId | <code>*</code> |
|
|
159
|
+| componentId | <code>*</code> |
|
160
|
160
|
|
161
|
161
|
|
162
|
162
|
* * *
|
|
@@ -165,4 +165,3 @@ Pop the container's stack to root.
|
165
|
165
|
|
166
|
166
|
## navigation.events()
|
167
|
167
|
Obtain the events registery instance
|
168
|
|
-
|