hi i am new to react-native...help me out with refreshing or reload my app current component when i come to foreground in my app...
currently i am using this code to manage my states:
componentDidMount() {
AppState.addEventListener('change', (state) => {
if (state === 'active') {
console.log('foreground');
}
if(state === 'background'){
console.log('background');
}
})
}
I don't think this is a question related to react-native-arkit,... Nevertheless, I would suggest you use a state management library such as redux or mobx for managing your app states.
hi i am new to react-native...help me out with refreshing or reload my app current component when i come to foreground in my app... currently i am using this code to manage my states: componentDidMount() { AppState.addEventListener('change', (state) => { if (state === 'active') { console.log('foreground'); } if(state === 'background'){ console.log('background'); } }) }