|
@@ -4,11 +4,6 @@
|
4
|
4
|
|
5
|
5
|
`Element (React.ComponentType<object>)`
|
6
|
6
|
|
7
|
|
----
|
8
|
|
-## TouchablePreview
|
9
|
|
-
|
10
|
|
-`TouchablePreview (React.ComponentType<TouchablePreviewProps>)`
|
11
|
|
-
|
12
|
7
|
---
|
13
|
8
|
## store
|
14
|
9
|
|
|
@@ -20,7 +15,7 @@
|
20
|
15
|
|
21
|
16
|
`registerComponent(componentName: string, getComponentClassFunc: ComponentProvider): ComponentType<any>`
|
22
|
17
|
|
23
|
|
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/Navigation.ts#L55)
|
|
18
|
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/Navigation.ts#L52)
|
24
|
19
|
|
25
|
20
|
Every navigation component in your app must be registered with a unique name.
|
26
|
21
|
The component itself is a traditional React component extending React.Component.
|
|
@@ -31,7 +26,7 @@ The component itself is a traditional React component extending React.Component.
|
31
|
26
|
|
32
|
27
|
`registerComponentWithRedux(componentName: string, getComponentClassFunc: ComponentProvider, ReduxProvider: any, reduxStore: any): ComponentType<any>`
|
33
|
28
|
|
34
|
|
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/Navigation.ts#L63)
|
|
29
|
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/Navigation.ts#L60)
|
35
|
30
|
|
36
|
31
|
Utility helper function like registerComponent,
|
37
|
32
|
wraps the provided component with a react-redux Provider with the passed redux store
|
|
@@ -42,7 +37,7 @@ wraps the provided component with a react-redux Provider with the passed redux s
|
42
|
37
|
|
43
|
38
|
`setRoot(layout: any): Promise<any>`
|
44
|
39
|
|
45
|
|
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/Navigation.ts#L70)
|
|
40
|
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/Navigation.ts#L67)
|
46
|
41
|
|
47
|
42
|
Reset the app to a new layout
|
48
|
43
|
|
|
@@ -52,7 +47,7 @@ Reset the app to a new layout
|
52
|
47
|
|
53
|
48
|
`setDefaultOptions(options: any): void`
|
54
|
49
|
|
55
|
|
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/Navigation.ts#L77)
|
|
50
|
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/Navigation.ts#L74)
|
56
|
51
|
|
57
|
52
|
Set default options to all screens. Useful for declaring a consistent style across the app.
|
58
|
53
|
|
|
@@ -62,7 +57,7 @@ Set default options to all screens. Useful for declaring a consistent style acro
|
62
|
57
|
|
63
|
58
|
`mergeOptions(componentId: string, options: any): void`
|
64
|
59
|
|
65
|
|
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/Navigation.ts#L84)
|
|
60
|
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/Navigation.ts#L81)
|
66
|
61
|
|
67
|
62
|
Change a component's navigation options
|
68
|
63
|
|
|
@@ -72,7 +67,7 @@ Change a component's navigation options
|
72
|
67
|
|
73
|
68
|
`showModal(layout: any): Promise<any>`
|
74
|
69
|
|
75
|
|
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/Navigation.ts#L91)
|
|
70
|
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/Navigation.ts#L88)
|
76
|
71
|
|
77
|
72
|
Show a screen as a modal.
|
78
|
73
|
|
|
@@ -82,7 +77,7 @@ Show a screen as a modal.
|
82
|
77
|
|
83
|
78
|
`dismissModal(componentId: string): Promise<any>`
|
84
|
79
|
|
85
|
|
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/Navigation.ts#L98)
|
|
80
|
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/Navigation.ts#L95)
|
86
|
81
|
|
87
|
82
|
Dismiss a modal by componentId. The dismissed modal can be anywhere in the stack.
|
88
|
83
|
|
|
@@ -92,7 +87,7 @@ Dismiss a modal by componentId. The dismissed modal can be anywhere in the stack
|
92
|
87
|
|
93
|
88
|
`dismissAllModals(): Promise<any>`
|
94
|
89
|
|
95
|
|
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/Navigation.ts#L105)
|
|
90
|
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/Navigation.ts#L102)
|
96
|
91
|
|
97
|
92
|
Dismiss all Modals
|
98
|
93
|
|
|
@@ -102,7 +97,7 @@ Dismiss all Modals
|
102
|
97
|
|
103
|
98
|
`push(componentId: string, layout: any): Promise<any>`
|
104
|
99
|
|
105
|
|
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/Navigation.ts#L112)
|
|
100
|
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/Navigation.ts#L109)
|
106
|
101
|
|
107
|
102
|
Push a new layout into this screen's navigation stack.
|
108
|
103
|
|
|
@@ -112,7 +107,7 @@ Push a new layout into this screen's navigation stack.
|
112
|
107
|
|
113
|
108
|
`pop(componentId: string, params: any): Promise<any>`
|
114
|
109
|
|
115
|
|
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/Navigation.ts#L119)
|
|
110
|
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/Navigation.ts#L116)
|
116
|
111
|
|
117
|
112
|
Pop a component from the stack, regardless of it's position.
|
118
|
113
|
|
|
@@ -122,7 +117,7 @@ Pop a component from the stack, regardless of it's position.
|
122
|
117
|
|
123
|
118
|
`popTo(componentId: string): Promise<any>`
|
124
|
119
|
|
125
|
|
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/Navigation.ts#L126)
|
|
120
|
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/Navigation.ts#L123)
|
126
|
121
|
|
127
|
122
|
Pop the stack to a given component
|
128
|
123
|
|
|
@@ -132,7 +127,7 @@ Pop the stack to a given component
|
132
|
127
|
|
133
|
128
|
`popToRoot(componentId: string): Promise<any>`
|
134
|
129
|
|
135
|
|
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/Navigation.ts#L133)
|
|
130
|
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/Navigation.ts#L130)
|
136
|
131
|
|
137
|
132
|
Pop the component's stack to root.
|
138
|
133
|
|
|
@@ -142,7 +137,7 @@ Pop the component's stack to root.
|
142
|
137
|
|
143
|
138
|
`setStackRoot(componentId: string, layout: any): Promise<any>`
|
144
|
139
|
|
145
|
|
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/Navigation.ts#L140)
|
|
140
|
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/Navigation.ts#L137)
|
146
|
141
|
|
147
|
142
|
Sets new root component to stack.
|
148
|
143
|
|
|
@@ -152,7 +147,7 @@ Sets new root component to stack.
|
152
|
147
|
|
153
|
148
|
`showOverlay(layout: any): Promise<any>`
|
154
|
149
|
|
155
|
|
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/Navigation.ts#L147)
|
|
150
|
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/Navigation.ts#L144)
|
156
|
151
|
|
157
|
152
|
Show overlay on top of the entire app
|
158
|
153
|
|
|
@@ -162,7 +157,7 @@ Show overlay on top of the entire app
|
162
|
157
|
|
163
|
158
|
`dismissOverlay(componentId: string): Promise<any>`
|
164
|
159
|
|
165
|
|
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/Navigation.ts#L154)
|
|
160
|
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/Navigation.ts#L151)
|
166
|
161
|
|
167
|
162
|
dismiss overlay by componentId
|
168
|
163
|
|
|
@@ -172,7 +167,7 @@ dismiss overlay by componentId
|
172
|
167
|
|
173
|
168
|
`getLaunchArgs(): Promise<any>`
|
174
|
169
|
|
175
|
|
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/Navigation.ts#L161)
|
|
170
|
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/Navigation.ts#L158)
|
176
|
171
|
|
177
|
172
|
Resolves arguments passed on launch
|
178
|
173
|
|
|
@@ -182,7 +177,7 @@ Resolves arguments passed on launch
|
182
|
177
|
|
183
|
178
|
`events(): EventsRegistry`
|
184
|
179
|
|
185
|
|
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/Navigation.ts#L168)
|
|
180
|
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/Navigation.ts#L165)
|
186
|
181
|
|
187
|
182
|
Obtain the events registry instance
|
188
|
183
|
|
|
@@ -192,7 +187,7 @@ Obtain the events registry instance
|
192
|
187
|
|
193
|
188
|
`constants(): Promise<any>`
|
194
|
189
|
|
195
|
|
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/Navigation.ts#L175)
|
|
190
|
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/Navigation.ts#L172)
|
196
|
191
|
|
197
|
192
|
Constants coming from native
|
198
|
193
|
|