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