Browse Source

update docs

Daniel Zlotin 6 years ago
parent
commit
ab8ba4e659

+ 13
- 13
docs/api/Commands.md View File

4
 
4
 
5
 `setRoot(simpleApi: any): any`
5
 `setRoot(simpleApi: any): any`
6
 
6
 
7
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/commands/Commands.ts#L12)
7
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/commands/Commands.ts#L13)
8
 
8
 
9
 ---
9
 ---
10
 
10
 
12
 
12
 
13
 `setDefaultOptions(options: any): void`
13
 `setDefaultOptions(options: any): void`
14
 
14
 
15
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/commands/Commands.ts#L22)
15
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/commands/Commands.ts#L23)
16
 
16
 
17
 ---
17
 ---
18
 
18
 
20
 
20
 
21
 `mergeOptions(componentId: any, options: any): void`
21
 `mergeOptions(componentId: any, options: any): void`
22
 
22
 
23
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/commands/Commands.ts#L30)
23
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/commands/Commands.ts#L31)
24
 
24
 
25
 ---
25
 ---
26
 
26
 
28
 
28
 
29
 `showModal(simpleApi: any): any`
29
 `showModal(simpleApi: any): any`
30
 
30
 
31
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/commands/Commands.ts#L38)
31
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/commands/Commands.ts#L39)
32
 
32
 
33
 ---
33
 ---
34
 
34
 
36
 
36
 
37
 `dismissModal(componentId: any): any`
37
 `dismissModal(componentId: any): any`
38
 
38
 
39
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/commands/Commands.ts#L48)
39
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/commands/Commands.ts#L49)
40
 
40
 
41
 ---
41
 ---
42
 
42
 
44
 
44
 
45
 `dismissAllModals(): any`
45
 `dismissAllModals(): any`
46
 
46
 
47
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/commands/Commands.ts#L54)
47
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/commands/Commands.ts#L55)
48
 
48
 
49
 ---
49
 ---
50
 
50
 
52
 
52
 
53
 `push(componentId: any, simpleApi: any): any`
53
 `push(componentId: any, simpleApi: any): any`
54
 
54
 
55
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/commands/Commands.ts#L60)
55
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/commands/Commands.ts#L61)
56
 
56
 
57
 ---
57
 ---
58
 
58
 
60
 
60
 
61
 `pop(componentId: any, options: any): any`
61
 `pop(componentId: any, options: any): any`
62
 
62
 
63
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/commands/Commands.ts#L71)
63
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/commands/Commands.ts#L72)
64
 
64
 
65
 ---
65
 ---
66
 
66
 
68
 
68
 
69
 `popTo(componentId: any): any`
69
 `popTo(componentId: any): any`
70
 
70
 
71
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/commands/Commands.ts#L77)
71
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/commands/Commands.ts#L78)
72
 
72
 
73
 ---
73
 ---
74
 
74
 
76
 
76
 
77
 `popToRoot(componentId: any): any`
77
 `popToRoot(componentId: any): any`
78
 
78
 
79
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/commands/Commands.ts#L83)
79
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/commands/Commands.ts#L84)
80
 
80
 
81
 ---
81
 ---
82
 
82
 
84
 
84
 
85
 `setStackRoot(componentId: any, simpleApi: any): any`
85
 `setStackRoot(componentId: any, simpleApi: any): any`
86
 
86
 
87
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/commands/Commands.ts#L89)
87
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/commands/Commands.ts#L90)
88
 
88
 
89
 ---
89
 ---
90
 
90
 
92
 
92
 
93
 `showOverlay(simpleApi: any): any`
93
 `showOverlay(simpleApi: any): any`
94
 
94
 
95
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/commands/Commands.ts#L100)
95
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/commands/Commands.ts#L101)
96
 
96
 
97
 ---
97
 ---
98
 
98
 
100
 
100
 
101
 `dismissOverlay(componentId: any): any`
101
 `dismissOverlay(componentId: any): any`
102
 
102
 
103
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/commands/Commands.ts#L111)
103
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/commands/Commands.ts#L112)
104
 
104
 
105
 ---
105
 ---
106
 
106
 

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

4
 
4
 
5
 `registerForAllComponents(): void`
5
 `registerForAllComponents(): void`
6
 
6
 
7
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/events/ComponentEventsObserver.ts#L11)
7
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/events/ComponentEventsObserver.ts#L13)
8
 
8
 
9
 ---
9
 ---
10
 
10
 

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

33
 
33
 
34
 `setState(state: function | S | object, callback: function): void`
34
 `setState(state: function | S | object, callback: function): void`
35
 
35
 
36
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src//Users/danielzlotin/dev/react-native-navigation/node_modules/@types/react/index.d.ts#L288)
36
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src//Users/danielzlotin/dev/react-native-navigation/node_modules/@types/react/index.d.ts#L287)
37
 
37
 
38
 ---
38
 ---
39
 
39
 
41
 
41
 
42
 `forceUpdate(callBack: function): void`
42
 `forceUpdate(callBack: function): void`
43
 
43
 
44
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src//Users/danielzlotin/dev/react-native-navigation/node_modules/@types/react/index.d.ts#L293)
44
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src//Users/danielzlotin/dev/react-native-navigation/node_modules/@types/react/index.d.ts#L292)
45
 
45
 
46
 ---
46
 ---
47
 
47
 
49
 
49
 
50
 `componentDidMount(): void`
50
 `componentDidMount(): void`
51
 
51
 
52
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src//Users/danielzlotin/dev/react-native-navigation/node_modules/@types/react/index.d.ts#L377)
52
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src//Users/danielzlotin/dev/react-native-navigation/node_modules/@types/react/index.d.ts#L376)
53
 
53
 
54
 Called immediately after a compoment is mounted. Setting state here will trigger re-rendering.
54
 Called immediately after a compoment is mounted. Setting state here will trigger re-rendering.
55
 
55
 
59
 
59
 
60
 `shouldComponentUpdate(nextProps: Readonly<object>, nextState: Readonly<any>, nextContext: any): boolean`
60
 `shouldComponentUpdate(nextProps: Readonly<object>, nextState: Readonly<any>, nextContext: any): boolean`
61
 
61
 
62
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src//Users/danielzlotin/dev/react-native-navigation/node_modules/@types/react/index.d.ts#L388)
62
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src//Users/danielzlotin/dev/react-native-navigation/node_modules/@types/react/index.d.ts#L387)
63
 
63
 
64
 Called to determine whether the change in props and state should trigger a re-render.
64
 Called to determine whether the change in props and state should trigger a re-render.
65
 
65
 
69
 
69
 
70
 `componentWillUnmount(): void`
70
 `componentWillUnmount(): void`
71
 
71
 
72
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src//Users/danielzlotin/dev/react-native-navigation/node_modules/@types/react/index.d.ts#L393)
72
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src//Users/danielzlotin/dev/react-native-navigation/node_modules/@types/react/index.d.ts#L392)
73
 
73
 
74
 Called immediately before a component is destroyed. Perform any necessary cleanup in this method, such as
74
 Called immediately before a component is destroyed. Perform any necessary cleanup in this method, such as
75
 cancelled network requests, or cleaning up any DOM elements created in `componentDidMount`.
75
 cancelled network requests, or cleaning up any DOM elements created in `componentDidMount`.
80
 
80
 
81
 `componentDidCatch(error: Error, errorInfo: ErrorInfo): void`
81
 `componentDidCatch(error: Error, errorInfo: ErrorInfo): void`
82
 
82
 
83
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src//Users/danielzlotin/dev/react-native-navigation/node_modules/@types/react/index.d.ts#L398)
83
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src//Users/danielzlotin/dev/react-native-navigation/node_modules/@types/react/index.d.ts#L397)
84
 
84
 
85
 Catches exceptions generated in descendant components. Unhandled exceptions will cause
85
 Catches exceptions generated in descendant components. Unhandled exceptions will cause
86
 the entire component tree to unmount.
86
 the entire component tree to unmount.
91
 
91
 
92
 `getSnapshotBeforeUpdate(prevProps: Readonly<object>, prevState: Readonly<any>): SS | null`
92
 `getSnapshotBeforeUpdate(prevProps: Readonly<object>, prevState: Readonly<any>): SS | null`
93
 
93
 
94
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src//Users/danielzlotin/dev/react-native-navigation/node_modules/@types/react/index.d.ts#L424)
94
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src//Users/danielzlotin/dev/react-native-navigation/node_modules/@types/react/index.d.ts#L423)
95
 
95
 
96
 Runs before React applies the result of `render` to the document, and
96
 Runs before React applies the result of `render` to the document, and
97
 returns an object to be given to componentDidUpdate. Useful for saving
97
 returns an object to be given to componentDidUpdate. Useful for saving
103
 
103
 
104
 `componentDidUpdate(prevProps: Readonly<object>, prevState: Readonly<any>, snapshot: SS): void`
104
 `componentDidUpdate(prevProps: Readonly<object>, prevState: Readonly<any>, snapshot: SS): void`
105
 
105
 
106
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src//Users/danielzlotin/dev/react-native-navigation/node_modules/@types/react/index.d.ts#L430)
106
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src//Users/danielzlotin/dev/react-native-navigation/node_modules/@types/react/index.d.ts#L429)
107
 
107
 
108
 Called immediately after updating occurs. Not called for the initial render.
108
 Called immediately after updating occurs. Not called for the initial render.
109
 
109
 
113
 
113
 
114
 `componentWillMount(): void`
114
 `componentWillMount(): void`
115
 
115
 
116
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src//Users/danielzlotin/dev/react-native-navigation/node_modules/@types/react/index.d.ts#L445)
116
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src//Users/danielzlotin/dev/react-native-navigation/node_modules/@types/react/index.d.ts#L444)
117
 
117
 
118
 Called immediately before mounting occurs, and before `Component#render`.
118
 Called immediately before mounting occurs, and before `Component#render`.
119
 Avoid introducing any side-effects or subscriptions in this method.
119
 Avoid introducing any side-effects or subscriptions in this method.
124
 
124
 
125
 `UNSAFE_componentWillMount(): void`
125
 `UNSAFE_componentWillMount(): void`
126
 
126
 
127
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src//Users/danielzlotin/dev/react-native-navigation/node_modules/@types/react/index.d.ts#L459)
127
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src//Users/danielzlotin/dev/react-native-navigation/node_modules/@types/react/index.d.ts#L458)
128
 
128
 
129
 Called immediately before mounting occurs, and before `Component#render`.
129
 Called immediately before mounting occurs, and before `Component#render`.
130
 Avoid introducing any side-effects or subscriptions in this method.
130
 Avoid introducing any side-effects or subscriptions in this method.
135
 
135
 
136
 `componentWillReceiveProps(nextProps: Readonly<object>, nextContext: any): void`
136
 `componentWillReceiveProps(nextProps: Readonly<object>, nextContext: any): void`
137
 
137
 
138
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src//Users/danielzlotin/dev/react-native-navigation/node_modules/@types/react/index.d.ts#L474)
138
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src//Users/danielzlotin/dev/react-native-navigation/node_modules/@types/react/index.d.ts#L473)
139
 
139
 
140
 Called when the component may be receiving new props.
140
 Called when the component may be receiving new props.
141
 React may call this even if props have not changed, so be sure to compare new and existing
141
 React may call this even if props have not changed, so be sure to compare new and existing
147
 
147
 
148
 `UNSAFE_componentWillReceiveProps(nextProps: Readonly<object>, nextContext: any): void`
148
 `UNSAFE_componentWillReceiveProps(nextProps: Readonly<object>, nextContext: any): void`
149
 
149
 
150
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src//Users/danielzlotin/dev/react-native-navigation/node_modules/@types/react/index.d.ts#L491)
150
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src//Users/danielzlotin/dev/react-native-navigation/node_modules/@types/react/index.d.ts#L490)
151
 
151
 
152
 Called when the component may be receiving new props.
152
 Called when the component may be receiving new props.
153
 React may call this even if props have not changed, so be sure to compare new and existing
153
 React may call this even if props have not changed, so be sure to compare new and existing
159
 
159
 
160
 `componentWillUpdate(nextProps: Readonly<object>, nextState: Readonly<any>, nextContext: any): void`
160
 `componentWillUpdate(nextProps: Readonly<object>, nextState: Readonly<any>, nextContext: any): void`
161
 
161
 
162
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src//Users/danielzlotin/dev/react-native-navigation/node_modules/@types/react/index.d.ts#L504)
162
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src//Users/danielzlotin/dev/react-native-navigation/node_modules/@types/react/index.d.ts#L503)
163
 
163
 
164
 Called immediately before rendering when new props or state is received. Not called for the initial render.
164
 Called immediately before rendering when new props or state is received. Not called for the initial render.
165
 
165
 
169
 
169
 
170
 `UNSAFE_componentWillUpdate(nextProps: Readonly<object>, nextState: Readonly<any>, nextContext: any): void`
170
 `UNSAFE_componentWillUpdate(nextProps: Readonly<object>, nextState: Readonly<any>, nextContext: any): void`
171
 
171
 
172
-[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src//Users/danielzlotin/dev/react-native-navigation/node_modules/@types/react/index.d.ts#L519)
172
+[source](https://github.com/wix/react-native-navigation/blob/v2/lib/src//Users/danielzlotin/dev/react-native-navigation/node_modules/@types/react/index.d.ts#L518)
173
 
173
 
174
 Called immediately before rendering when new props or state is received. Not called for the initial render.
174
 Called immediately before rendering when new props or state is received. Not called for the initial render.
175
 
175
 

+ 12
- 12
docs/api/EventsRegistry.md View File

1
 # EventsRegistry
1
 # EventsRegistry
2
 
2
 
3
-## onAppLaunched
3
+## registerAppLaunchedListener
4
 
4
 
5
-`onAppLaunched(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#L8)
7
 [source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/events/EventsRegistry.ts#L8)
8
 
8
 
9
 ---
9
 ---
10
 
10
 
11
-## componentDidAppear
11
+## registerComponentDidAppearListener
12
 
12
 
13
-`componentDidAppear(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#L12)
15
 [source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/events/EventsRegistry.ts#L12)
16
 
16
 
17
 ---
17
 ---
18
 
18
 
19
-## componentDidDisappear
19
+## registerComponentDidDisappearListener
20
 
20
 
21
-`componentDidDisappear(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#L16)
23
 [source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/events/EventsRegistry.ts#L16)
24
 
24
 
25
 ---
25
 ---
26
 
26
 
27
-## onNavigationButtonPressed
27
+## registerCommandListener
28
 
28
 
29
-`onNavigationButtonPressed(callback: function): EventSubscription`
29
+`registerCommandListener(callback: function): EventSubscription`
30
 
30
 
31
 [source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/events/EventsRegistry.ts#L20)
31
 [source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/events/EventsRegistry.ts#L20)
32
 
32
 
33
 ---
33
 ---
34
 
34
 
35
-## onNavigationCommand
35
+## registerCommandCompletedListener
36
 
36
 
37
-`onNavigationCommand(callback: function): EventSubscription`
37
+`registerCommandCompletedListener(callback: function): EventSubscription`
38
 
38
 
39
 [source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/events/EventsRegistry.ts#L24)
39
 [source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/events/EventsRegistry.ts#L24)
40
 
40
 
41
 ---
41
 ---
42
 
42
 
43
-## onNavigationEvent
43
+## registerNativeEventListener
44
 
44
 
45
-`onNavigationEvent(callback: function): EventSubscription`
45
+`registerNativeEventListener(callback: function): EventSubscription`
46
 
46
 
47
 [source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/events/EventsRegistry.ts#L28)
47
 [source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/events/EventsRegistry.ts#L28)
48
 
48
 

+ 10
- 10
docs/api/NativeEventsReceiver.md View File

1
 # NativeEventsReceiver
1
 # NativeEventsReceiver
2
 
2
 
3
-## registerOnAppLaunched
3
+## registerAppLaunchedListener
4
 
4
 
5
-`registerOnAppLaunched(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#L10)
7
 [source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/adapters/NativeEventsReceiver.ts#L10)
8
 
8
 
9
 ---
9
 ---
10
 
10
 
11
-## registerComponentDidAppear
11
+## registerComponentDidAppearListener
12
 
12
 
13
-`registerComponentDidAppear(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#L14)
15
 [source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/adapters/NativeEventsReceiver.ts#L14)
16
 
16
 
17
 ---
17
 ---
18
 
18
 
19
-## registerComponentDidDisappear
19
+## registerComponentDidDisappearListener
20
 
20
 
21
-`registerComponentDidDisappear(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#L18)
23
 [source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/adapters/NativeEventsReceiver.ts#L18)
24
 
24
 
25
 ---
25
 ---
26
 
26
 
27
-## registerOnNavigationButtonPressed
27
+## registerCommandCompletedListener
28
 
28
 
29
-`registerOnNavigationButtonPressed(callback: function): EventSubscription`
29
+`registerCommandCompletedListener(callback: function): EventSubscription`
30
 
30
 
31
 [source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/adapters/NativeEventsReceiver.ts#L22)
31
 [source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/adapters/NativeEventsReceiver.ts#L22)
32
 
32
 
33
 ---
33
 ---
34
 
34
 
35
-## registerOnNavigationEvent
35
+## registerNativeEventListener
36
 
36
 
37
-`registerOnNavigationEvent(callback: function): EventSubscription`
37
+`registerNativeEventListener(callback: function): EventSubscription`
38
 
38
 
39
 [source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/adapters/NativeEventsReceiver.ts#L26)
39
 [source](https://github.com/wix/react-native-navigation/blob/v2/lib/src/adapters/NativeEventsReceiver.ts#L26)
40
 
40