Browse Source

update docs

Daniel Zlotin 6 years ago
parent
commit
c657ff9fd6

+ 8
- 16
docs/api/ComponentEventsObserver.md View File

4
 
4
 
5
 `registerOnceForAllComponentEvents(): void`
5
 `registerOnceForAllComponentEvents(): void`
6
 
6
 
7
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/events/ComponentEventsObserver.ts#L27)
7
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/events/ComponentEventsObserver.ts#L25)
8
 
8
 
9
 ---
9
 ---
10
 
10
 
12
 
12
 
13
 `bindComponent(component: Component<any>): EventSubscription`
13
 `bindComponent(component: Component<any>): EventSubscription`
14
 
14
 
15
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/events/ComponentEventsObserver.ts#L38)
15
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/events/ComponentEventsObserver.ts#L35)
16
 
16
 
17
 ---
17
 ---
18
 
18
 
20
 
20
 
21
 `unmounted(componentId: string): void`
21
 `unmounted(componentId: string): void`
22
 
22
 
23
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/events/ComponentEventsObserver.ts#L52)
23
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/events/ComponentEventsObserver.ts#L49)
24
 
24
 
25
 ---
25
 ---
26
 
26
 
28
 
28
 
29
 `notifyComponentDidAppear(event: ComponentDidAppearEvent): void`
29
 `notifyComponentDidAppear(event: ComponentDidAppearEvent): void`
30
 
30
 
31
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/events/ComponentEventsObserver.ts#L56)
31
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/events/ComponentEventsObserver.ts#L53)
32
 
32
 
33
 ---
33
 ---
34
 
34
 
36
 
36
 
37
 `notifyComponentDidDisappear(event: ComponentDidDisappearEvent): void`
37
 `notifyComponentDidDisappear(event: ComponentDidDisappearEvent): void`
38
 
38
 
39
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/events/ComponentEventsObserver.ts#L60)
39
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/events/ComponentEventsObserver.ts#L57)
40
 
40
 
41
 ---
41
 ---
42
 
42
 
44
 
44
 
45
 `notifyNavigationButtonPressed(event: NavigationButtonPressedEvent): void`
45
 `notifyNavigationButtonPressed(event: NavigationButtonPressedEvent): void`
46
 
46
 
47
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/events/ComponentEventsObserver.ts#L64)
47
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/events/ComponentEventsObserver.ts#L61)
48
 
48
 
49
 ---
49
 ---
50
 
50
 
52
 
52
 
53
 `notifySearchBarUpdated(event: SearchBarUpdatedEvent): void`
53
 `notifySearchBarUpdated(event: SearchBarUpdatedEvent): void`
54
 
54
 
55
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/events/ComponentEventsObserver.ts#L68)
55
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/events/ComponentEventsObserver.ts#L65)
56
 
56
 
57
 ---
57
 ---
58
 
58
 
60
 
60
 
61
 `notifySearchBarCancelPressed(event: SearchBarCancelPressedEvent): void`
61
 `notifySearchBarCancelPressed(event: SearchBarCancelPressedEvent): void`
62
 
62
 
63
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/events/ComponentEventsObserver.ts#L72)
64
-
65
----
66
-
67
-## notifyPreviewCompleted
68
-
69
-`notifyPreviewCompleted(event: PreviewCompletedEvent): void`
70
-
71
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/events/ComponentEventsObserver.ts#L76)
63
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/events/ComponentEventsObserver.ts#L69)
72
 
64
 
73
 ---
65
 ---
74
 
66
 

+ 1
- 1
docs/api/Element.md View File

25
 
25
 
26
 `render(): Element`
26
 `render(): Element`
27
 
27
 
28
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/adapters/Element.tsx#L17)
28
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/adapters/Element.tsx#L18)
29
 
29
 
30
 ---
30
 ---
31
 
31
 

+ 10
- 18
docs/api/EventsRegistry.md View File

4
 
4
 
5
 `registerAppLaunchedListener(callback: function): EventSubscription`
5
 `registerAppLaunchedListener(callback: function): EventSubscription`
6
 
6
 
7
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/events/EventsRegistry.ts#L18)
7
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/events/EventsRegistry.ts#L17)
8
 
8
 
9
 ---
9
 ---
10
 
10
 
12
 
12
 
13
 `registerComponentDidAppearListener(callback: function): EventSubscription`
13
 `registerComponentDidAppearListener(callback: function): EventSubscription`
14
 
14
 
15
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/events/EventsRegistry.ts#L22)
15
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/events/EventsRegistry.ts#L21)
16
 
16
 
17
 ---
17
 ---
18
 
18
 
20
 
20
 
21
 `registerComponentDidDisappearListener(callback: function): EventSubscription`
21
 `registerComponentDidDisappearListener(callback: function): EventSubscription`
22
 
22
 
23
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/events/EventsRegistry.ts#L26)
23
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/events/EventsRegistry.ts#L25)
24
 
24
 
25
 ---
25
 ---
26
 
26
 
28
 
28
 
29
 `registerCommandCompletedListener(callback: function): EventSubscription`
29
 `registerCommandCompletedListener(callback: function): EventSubscription`
30
 
30
 
31
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/events/EventsRegistry.ts#L30)
31
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/events/EventsRegistry.ts#L29)
32
 
32
 
33
 ---
33
 ---
34
 
34
 
36
 
36
 
37
 `registerBottomTabSelectedListener(callback: function): EventSubscription`
37
 `registerBottomTabSelectedListener(callback: function): EventSubscription`
38
 
38
 
39
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/events/EventsRegistry.ts#L34)
39
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/events/EventsRegistry.ts#L33)
40
 
40
 
41
 ---
41
 ---
42
 
42
 
44
 
44
 
45
 `registerNavigationButtonPressedListener(callback: function): EventSubscription`
45
 `registerNavigationButtonPressedListener(callback: function): EventSubscription`
46
 
46
 
47
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/events/EventsRegistry.ts#L38)
47
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/events/EventsRegistry.ts#L37)
48
 
48
 
49
 ---
49
 ---
50
 
50
 
52
 
52
 
53
 `registerSearchBarUpdatedListener(callback: function): EventSubscription`
53
 `registerSearchBarUpdatedListener(callback: function): EventSubscription`
54
 
54
 
55
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/events/EventsRegistry.ts#L42)
55
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/events/EventsRegistry.ts#L41)
56
 
56
 
57
 ---
57
 ---
58
 
58
 
60
 
60
 
61
 `registerSearchBarCancelPressedListener(callback: function): EventSubscription`
61
 `registerSearchBarCancelPressedListener(callback: function): EventSubscription`
62
 
62
 
63
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/events/EventsRegistry.ts#L46)
64
-
65
----
66
-
67
-## registerPreviewCompletedListener
68
-
69
-`registerPreviewCompletedListener(callback: function): EventSubscription`
70
-
71
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/events/EventsRegistry.ts#L50)
63
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/events/EventsRegistry.ts#L45)
72
 
64
 
73
 ---
65
 ---
74
 
66
 
76
 
68
 
77
 `registerCommandListener(callback: function): EventSubscription`
69
 `registerCommandListener(callback: function): EventSubscription`
78
 
70
 
79
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/events/EventsRegistry.ts#L54)
71
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/events/EventsRegistry.ts#L49)
80
 
72
 
81
 ---
73
 ---
82
 
74
 
84
 
76
 
85
 `bindComponent(component: Component<any>): EventSubscription`
77
 `bindComponent(component: Component<any>): EventSubscription`
86
 
78
 
87
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/events/EventsRegistry.ts#L58)
79
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/events/EventsRegistry.ts#L53)
88
 
80
 
89
 ---
81
 ---
90
 
82
 

+ 8
- 16
docs/api/NativeEventsReceiver.md View File

4
 
4
 
5
 `registerAppLaunchedListener(callback: function): EventSubscription`
5
 `registerAppLaunchedListener(callback: function): EventSubscription`
6
 
6
 
7
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/adapters/NativeEventsReceiver.ts#L29)
7
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/adapters/NativeEventsReceiver.ts#L28)
8
 
8
 
9
 ---
9
 ---
10
 
10
 
12
 
12
 
13
 `registerComponentDidAppearListener(callback: function): EventSubscription`
13
 `registerComponentDidAppearListener(callback: function): EventSubscription`
14
 
14
 
15
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/adapters/NativeEventsReceiver.ts#L33)
15
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/adapters/NativeEventsReceiver.ts#L32)
16
 
16
 
17
 ---
17
 ---
18
 
18
 
20
 
20
 
21
 `registerComponentDidDisappearListener(callback: function): EventSubscription`
21
 `registerComponentDidDisappearListener(callback: function): EventSubscription`
22
 
22
 
23
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/adapters/NativeEventsReceiver.ts#L37)
23
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/adapters/NativeEventsReceiver.ts#L36)
24
 
24
 
25
 ---
25
 ---
26
 
26
 
28
 
28
 
29
 `registerNavigationButtonPressedListener(callback: function): EventSubscription`
29
 `registerNavigationButtonPressedListener(callback: function): EventSubscription`
30
 
30
 
31
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/adapters/NativeEventsReceiver.ts#L41)
31
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/adapters/NativeEventsReceiver.ts#L40)
32
 
32
 
33
 ---
33
 ---
34
 
34
 
36
 
36
 
37
 `registerSearchBarUpdatedListener(callback: function): EventSubscription`
37
 `registerSearchBarUpdatedListener(callback: function): EventSubscription`
38
 
38
 
39
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/adapters/NativeEventsReceiver.ts#L45)
39
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/adapters/NativeEventsReceiver.ts#L44)
40
 
40
 
41
 ---
41
 ---
42
 
42
 
44
 
44
 
45
 `registerSearchBarCancelPressedListener(callback: function): EventSubscription`
45
 `registerSearchBarCancelPressedListener(callback: function): EventSubscription`
46
 
46
 
47
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/adapters/NativeEventsReceiver.ts#L49)
48
-
49
----
50
-
51
-## registerPreviewCompletedListener
52
-
53
-`registerPreviewCompletedListener(callback: function): EventSubscription`
54
-
55
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/adapters/NativeEventsReceiver.ts#L53)
47
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/adapters/NativeEventsReceiver.ts#L48)
56
 
48
 
57
 ---
49
 ---
58
 
50
 
60
 
52
 
61
 `registerCommandCompletedListener(callback: function): EventSubscription`
53
 `registerCommandCompletedListener(callback: function): EventSubscription`
62
 
54
 
63
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/adapters/NativeEventsReceiver.ts#L57)
55
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/adapters/NativeEventsReceiver.ts#L52)
64
 
56
 
65
 ---
57
 ---
66
 
58
 
68
 
60
 
69
 `registerBottomTabSelectedListener(callback: function): EventSubscription`
61
 `registerBottomTabSelectedListener(callback: function): EventSubscription`
70
 
62
 
71
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/adapters/NativeEventsReceiver.ts#L61)
63
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/adapters/NativeEventsReceiver.ts#L56)
72
 
64
 
73
 ---
65
 ---
74
 
66
 

+ 18
- 23
docs/api/Navigation.md View File

4
 
4
 
5
 `Element (React.ComponentType<object>)`
5
 `Element (React.ComponentType<object>)`
6
 
6
 
7
----
8
-## TouchablePreview
9
-
10
-`TouchablePreview (React.ComponentType<TouchablePreviewProps>)`
11
-
12
 ---
7
 ---
13
 ## store
8
 ## store
14
 
9
 
20
 
15
 
21
 `registerComponent(componentName: string, getComponentClassFunc: ComponentProvider): ComponentType<any>`
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
 Every navigation component in your app must be registered with a unique name.
20
 Every navigation component in your app must be registered with a unique name.
26
 The component itself is a traditional React component extending React.Component.
21
 The component itself is a traditional React component extending React.Component.
31
 
26
 
32
 `registerComponentWithRedux(componentName: string, getComponentClassFunc: ComponentProvider, ReduxProvider: any, reduxStore: any): ComponentType<any>`
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
 Utility helper function like registerComponent,
31
 Utility helper function like registerComponent,
37
 wraps the provided component with a react-redux Provider with the passed redux store
32
 wraps the provided component with a react-redux Provider with the passed redux store
42
 
37
 
43
 `setRoot(layout: any): Promise<any>`
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
 Reset the app to a new layout
42
 Reset the app to a new layout
48
 
43
 
52
 
47
 
53
 `setDefaultOptions(options: any): void`
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
 Set default options to all screens. Useful for declaring a consistent style across the app.
52
 Set default options to all screens. Useful for declaring a consistent style across the app.
58
 
53
 
62
 
57
 
63
 `mergeOptions(componentId: string, options: any): void`
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
 Change a component's navigation options
62
 Change a component's navigation options
68
 
63
 
72
 
67
 
73
 `showModal(layout: any): Promise<any>`
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
 Show a screen as a modal.
72
 Show a screen as a modal.
78
 
73
 
82
 
77
 
83
 `dismissModal(componentId: string): Promise<any>`
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
 Dismiss a modal by componentId. The dismissed modal can be anywhere in the stack.
82
 Dismiss a modal by componentId. The dismissed modal can be anywhere in the stack.
88
 
83
 
92
 
87
 
93
 `dismissAllModals(): Promise<any>`
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
 Dismiss all Modals
92
 Dismiss all Modals
98
 
93
 
102
 
97
 
103
 `push(componentId: string, layout: any): Promise<any>`
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
 Push a new layout into this screen's navigation stack.
102
 Push a new layout into this screen's navigation stack.
108
 
103
 
112
 
107
 
113
 `pop(componentId: string, params: any): Promise<any>`
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
 Pop a component from the stack, regardless of it's position.
112
 Pop a component from the stack, regardless of it's position.
118
 
113
 
122
 
117
 
123
 `popTo(componentId: string): Promise<any>`
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
 Pop the stack to a given component
122
 Pop the stack to a given component
128
 
123
 
132
 
127
 
133
 `popToRoot(componentId: string): Promise<any>`
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
 Pop the component's stack to root.
132
 Pop the component's stack to root.
138
 
133
 
142
 
137
 
143
 `setStackRoot(componentId: string, layout: any): Promise<any>`
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
 Sets new root component to stack.
142
 Sets new root component to stack.
148
 
143
 
152
 
147
 
153
 `showOverlay(layout: any): Promise<any>`
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
 Show overlay on top of the entire app
152
 Show overlay on top of the entire app
158
 
153
 
162
 
157
 
163
 `dismissOverlay(componentId: string): Promise<any>`
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
 dismiss overlay by componentId
162
 dismiss overlay by componentId
168
 
163
 
172
 
167
 
173
 `getLaunchArgs(): Promise<any>`
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
 Resolves arguments passed on launch
172
 Resolves arguments passed on launch
178
 
173
 
182
 
177
 
183
 `events(): EventsRegistry`
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
 Obtain the events registry instance
182
 Obtain the events registry instance
188
 
183
 
192
 
187
 
193
 `constants(): Promise<any>`
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
 Constants coming from native
192
 Constants coming from native
198
 
193
 

+ 10
- 0
docs/api/OptionsModalPresentationStyle.md View File

1
+# OptionsModalPresentationStyle
2
+
3
+- currentContext
4
+- formSheet
5
+- fullScreen
6
+- none
7
+- overCurrentContext
8
+- overFullScreen
9
+- pageSheet
10
+- popOver

+ 1
- 1
docs/api/README.md View File

4
 - [Element](/api/Element)
4
 - [Element](/api/Element)
5
 - [NativeCommandsSender](/api/NativeCommandsSender)
5
 - [NativeCommandsSender](/api/NativeCommandsSender)
6
 - [NativeEventsReceiver](/api/NativeEventsReceiver)
6
 - [NativeEventsReceiver](/api/NativeEventsReceiver)
7
-- [TouchablePreview](/api/TouchablePreview)
8
 - [UniqueIdProvider](/api/UniqueIdProvider)
7
 - [UniqueIdProvider](/api/UniqueIdProvider)
9
 - [Commands](/api/Commands)
8
 - [Commands](/api/Commands)
10
 - [LayoutTreeCrawler](/api/LayoutTreeCrawler)
9
 - [LayoutTreeCrawler](/api/LayoutTreeCrawler)
18
 - [EventsRegistry](/api/EventsRegistry)
17
 - [EventsRegistry](/api/EventsRegistry)
19
 - [EventSubscription](/api/EventSubscription)
18
 - [EventSubscription](/api/EventSubscription)
20
 - [LayoutType](/api/LayoutType)
19
 - [LayoutType](/api/LayoutType)
20
+- [OptionsModalPresentationStyle](/api/OptionsModalPresentationStyle)

+ 1
- 1
docs/api/_sidebar.md View File

4
 - [Element](/api/Element)
4
 - [Element](/api/Element)
5
 - [NativeCommandsSender](/api/NativeCommandsSender)
5
 - [NativeCommandsSender](/api/NativeCommandsSender)
6
 - [NativeEventsReceiver](/api/NativeEventsReceiver)
6
 - [NativeEventsReceiver](/api/NativeEventsReceiver)
7
-- [TouchablePreview](/api/TouchablePreview)
8
 - [UniqueIdProvider](/api/UniqueIdProvider)
7
 - [UniqueIdProvider](/api/UniqueIdProvider)
9
 - [Commands](/api/Commands)
8
 - [Commands](/api/Commands)
10
 - [LayoutTreeCrawler](/api/LayoutTreeCrawler)
9
 - [LayoutTreeCrawler](/api/LayoutTreeCrawler)
18
 - [EventsRegistry](/api/EventsRegistry)
17
 - [EventsRegistry](/api/EventsRegistry)
19
 - [EventSubscription](/api/EventSubscription)
18
 - [EventSubscription](/api/EventSubscription)
20
 - [LayoutType](/api/LayoutType)
19
 - [LayoutType](/api/LayoutType)
20
+- [OptionsModalPresentationStyle](/api/OptionsModalPresentationStyle)

+ 1
- 1
docs/docs/options-migration.md View File

169
   }
169
   }
170
 });
170
 });
171
 ```
171
 ```
172
-On **iOS**, BottomTab visibility can be changed only when pushing screens. This means that if you'd like to hide BottomTabs when pushing a screen, You'll need to set the property to `false` in the options passed to the `push` command or via the `static get options() {}` api.
172
+On **iOS**, BottomTab visibility can be changed only when pushing screens. This means that if you'd like to hide BottomTabs when pushing a screen, You'll need to set the property to `false` in the options passed to the `push` command or via the `static options(passProps) {}` api.
173
 
173
 
174
 ## statusBarHidden
174
 ## statusBarHidden
175
 StatusBar visibility
175
 StatusBar visibility

+ 3
- 0
docs/docs/screen-api.md View File

128
 
128
 
129
 Set options dynamically for component.
129
 Set options dynamically for component.
130
 
130
 
131
+WARNING! this is called after the component has been rendered at least once.
132
+If you want the options to apply as soon as the screen is created, use `static options(passProps){...}` or pass the options as part of the push/modal etc command.
133
+
131
 ```js
134
 ```js
132
 Navigation.mergeOptions(this.props.componentId, {
135
 Navigation.mergeOptions(this.props.componentId, {
133
   topBar: {
136
   topBar: {

+ 4
- 4
docs/docs/styling.md View File

1
 # Styling Options
1
 # Styling Options
2
 
2
 
3
-You can style the navigator appearance and behavior by passing an `options` object. This object can be passed when the screen is originally created; can be defined per-screen by setting `static get options()` on the screen component; and can be overridden when a screen is pushed.
3
+You can style the navigator appearance and behavior by passing an `options` object. This object can be passed when the screen is originally created; can be defined per-screen by setting `static options(passProps)` on the screen component; and can be overridden when a screen is pushed, dynamically (after the screen was already rendered at least once) using `mergeOptions()`.
4
 
4
 
5
-The easiest way to style your screen is by adding `static get options()` to your screen React component definition.
5
+The easiest way to style your screen is by adding `static options(passProps)` to your screen React component definition. `passProps` is the same passProps you can specify as part of the push/modal or other command operation.
6
 
6
 
7
 ```js
7
 ```js
8
 export default class StyledScreen extends Component {
8
 export default class StyledScreen extends Component {
9
-  static get options() {
9
+  static options(passProps) {
10
     return {
10
     return {
11
       topBar: {
11
       topBar: {
12
         title: {
12
         title: {
43
 ```
43
 ```
44
 
44
 
45
 ## Setting styles dynamically
45
 ## Setting styles dynamically
46
-Use the `mergeOptions` method to change a screen's style dynamically.
46
+Use the `mergeOptions` method to change a screen's style dynamically. WARNING! these options will be applied on an already rendered screen, after it has been rendered at least once.
47
 
47
 
48
 ```js
48
 ```js
49
 Navigation.mergeOptions(this.props.componentId, {
49
 Navigation.mergeOptions(this.props.componentId, {

+ 3
- 3
docs/docs/topBar-buttons.md View File

20
 
20
 
21
 # Declaring Buttons statically
21
 # Declaring Buttons statically
22
 
22
 
23
-Buttons can be defined in a screen's static options:
23
+Buttons can be defined in a screen's options:
24
 
24
 
25
 ```js
25
 ```js
26
 class MyScreen extends Component {
26
 class MyScreen extends Component {
27
-  static get options() {
27
+  static options(passProps) {
28
     return {
28
     return {
29
       topBar: {
29
       topBar: {
30
         leftButtons: [
30
         leftButtons: [
70
 
70
 
71
 ```js
71
 ```js
72
 class MyScreen extends Component {
72
 class MyScreen extends Component {
73
-  static get options() {
73
+  static options(passProps) {
74
     return {
74
     return {
75
       topBar: {
75
       topBar: {
76
         rightButtons: {
76
         rightButtons: {