|
|
|
|
10
|
|
10
|
|
11
|
### A New Improved Core Architecture
|
11
|
### A New Improved Core Architecture
|
12
|
react-native-navigation has a few issues which are unsolvable in it’s current architecture. <br>
|
12
|
react-native-navigation has a few issues which are unsolvable in it’s current architecture. <br>
|
13
|
-These issue originate from the same problem: you cannot specify on which screen you wish to make an action. Whenever you want to push, show modal or any other action, the action defaults to originate from your current screen. This covers most use cases but there are some edge cases: <br>
|
|
|
|
|
13
|
+These issues originate from the same problem: you cannot specify on which screen you wish to make an action. Whenever you want to push a screen, show a modal or any other action, the action defaults to originate from your current screen. This covers most use cases but there are some edge cases: <br>
|
14
|
* What if you want to update your navbar icons and the user pops the screen? Your icons might update on the wrong screen.
|
14
|
* What if you want to update your navbar icons and the user pops the screen? Your icons might update on the wrong screen.
|
15
|
* What if you want to push a screen as a result of a redux action?
|
15
|
* What if you want to push a screen as a result of a redux action?
|
16
|
|
16
|
|
|
|
|
|
290
|
```
|
290
|
```
|
291
|
#### Screen Lifecycle - onStop() and onStart()
|
291
|
#### Screen Lifecycle - onStop() and onStart()
|
292
|
|
292
|
|
293
|
-the onStop() and onStart() function are lifecycle functions that are added to the screen and run when a screen apears and disappears from the screen. to use them simply add them to your component like any other react lifecycle function:
|
|
|
|
|
293
|
+The onStop() and onStart() functions are lifecycle functions that are added to the screen and run when a screen apears and disappears from the screen. To use them simply add them to your component like any other react lifecycle function:
|
294
|
|
294
|
|
295
|
```js
|
295
|
```js
|
296
|
class LifecycleScreen extends Component {
|
296
|
class LifecycleScreen extends Component {
|