react-native-ar / react-native-arkit

React Native binding for iOS ARKit
MIT License
1.73k stars 139 forks source link

Refresh app current component #191

Closed sjt145 closed 6 years ago

sjt145 commented 6 years ago

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'); } }) }

ambewas commented 6 years ago

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.