mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-05-26 15:58:28 +00:00
@@ -37,7 +37,6 @@ class Example extends React.Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
this.state = { currentAppState: AppState.currentState }
|
||||
this._handleAppStateChange = this._handleAppStateChange.bind(this)
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
@@ -48,7 +47,7 @@ class Example extends React.Component {
|
||||
AppState.removeEventListener('change', this._handleAppStateChange);
|
||||
}
|
||||
|
||||
_handleAppStateChange(currentAppState) {
|
||||
_handleAppStateChange = (currentAppState) => {
|
||||
this.setState({ currentAppState });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user