Browse Source

update the docs for screen lifecycle methods (#2953)

Jonny 6 years ago
parent
commit
e8c8d683f0
2 changed files with 6 additions and 6 deletions
  1. 1
    1
      docs/README.md
  2. 5
    5
      docs/docs/Usage.md

+ 1
- 1
docs/README.md View File

13
 - [v2 Roadmap](#v2-roadmap)
13
 - [v2 Roadmap](#v2-roadmap)
14
 - [v1 vs v2 feature comparison](#v1-vs-v2-feature-comparison)
14
 - [v1 vs v2 feature comparison](#v1-vs-v2-feature-comparison)
15
 - [Documentation](https://wix.github.io/react-native-navigation/v2/)
15
 - [Documentation](https://wix.github.io/react-native-navigation/v2/)
16
-- [Contributing](/docs/WorkingLocally.md)
16
+- [Contributing](/docs/docs/WorkingLocally.md)
17
 
17
 
18
 ## Why Rebuild react-native-navigation?
18
 ## Why Rebuild react-native-navigation?
19
 
19
 

+ 5
- 5
docs/docs/Usage.md View File

176
 
176
 
177
 ## Screen Lifecycle
177
 ## Screen Lifecycle
178
 
178
 
179
-The `didAppear` and `didDisappear` functions are lifecycle callbacks that are called by React Native Navigation on the component when it appears and disappears. 
179
+The `componentDidAppear` and `componentDidDisappear` functions are lifecycle callbacks that are called by React Native Navigation on the component when it appears and disappears. 
180
 
180
 
181
 These are similar to react's `componentDidMount` and `componentWillUnmount`, but are related to the actual visibility of a component to the user. While the component is `mounted` as soon as it's part of a layout, it is not always `visible` (for example, when another screen is `pushed` on top of it), and therefore React Native Navigation  takes some performance optimizations.
181
 These are similar to react's `componentDidMount` and `componentWillUnmount`, but are related to the actual visibility of a component to the user. While the component is `mounted` as soon as it's part of a layout, it is not always `visible` (for example, when another screen is `pushed` on top of it), and therefore React Native Navigation  takes some performance optimizations.
182
 
182
 
195
     };
195
     };
196
   }
196
   }
197
 
197
 
198
-  didAppear() {
199
-    this.setState({ text: 'didAppear' });
198
+  componentDidAppear() {
199
+    this.setState({ text: 'componentDidAppear' });
200
   }
200
   }
201
 
201
 
202
-  didDisappear() {
203
-    alert('didDisappear');
202
+  componentDidDisappear() {
203
+    alert('componentDidDisappear');
204
   }
204
   }
205
 
205
 
206
   componentWillUnmount() {
206
   componentWillUnmount() {