Changed componentwillmount (deprecated) to componentdidmount

This commit is contained in:
unknown
2020-10-29 10:20:36 +01:00
parent 104e212b2c
commit 562c4ddded
5 changed files with 4 additions and 3 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
node_modules

Binary file not shown.

View File

@@ -111,7 +111,7 @@ class Backhandler extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
render() { render() {
return (Object(react__WEBPACK_IMPORTED_MODULE_0__["createElement"])(react_native__WEBPACK_IMPORTED_MODULE_1__["View"], null)); return (Object(react__WEBPACK_IMPORTED_MODULE_0__["createElement"])(react_native__WEBPACK_IMPORTED_MODULE_1__["View"], null));
} }
componentWillMount() { componentDidMount() {
react_native__WEBPACK_IMPORTED_MODULE_1__["BackHandler"].addEventListener('hardwareBackPress', this.handleBackButtonClick); react_native__WEBPACK_IMPORTED_MODULE_1__["BackHandler"].addEventListener('hardwareBackPress', this.handleBackButtonClick);
} }
componentWillUnmount() { componentWillUnmount() {

File diff suppressed because one or more lines are too long

View File

@@ -23,7 +23,7 @@ export class Backhandler extends Component<BackhandlerProps<CustomStyle>> {
) )
} }
componentWillMount() { componentDidMount() {
BackHandler.addEventListener('hardwareBackPress', this.handleBackButtonClick); BackHandler.addEventListener('hardwareBackPress', this.handleBackButtonClick);
} }