@hedia/recommendation-screen 2.1.30 → 2.1.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -176,7 +176,7 @@ export default class RecommendationScreen extends React.Component<IRecommendatio
|
|
|
176
176
|
* Called immediately after a component is mounted. Setting state here will trigger re-rendering.
|
|
177
177
|
*
|
|
178
178
|
* Steps:
|
|
179
|
-
* 1.
|
|
179
|
+
* 1. If there is no error, create a listener to call the handleAppStateChange() method when the app state changes.
|
|
180
180
|
*/
|
|
181
181
|
componentDidMount(): void;
|
|
182
182
|
/**
|
|
@@ -386,10 +386,12 @@ export default class RecommendationScreen extends React.Component {
|
|
|
386
386
|
* Called immediately after a component is mounted. Setting state here will trigger re-rendering.
|
|
387
387
|
*
|
|
388
388
|
* Steps:
|
|
389
|
-
* 1.
|
|
389
|
+
* 1. If there is no error, create a listener to call the handleAppStateChange() method when the app state changes.
|
|
390
390
|
*/
|
|
391
391
|
componentDidMount() {
|
|
392
|
-
|
|
392
|
+
if (!this.hasError) {
|
|
393
|
+
this.appStateSubscription = AppState.addEventListener(`change`, this.handleAppStateChange);
|
|
394
|
+
}
|
|
393
395
|
}
|
|
394
396
|
/**
|
|
395
397
|
* Called immediately before a component is destroyed.
|