I recently upgraded my app from React Native v0.71.11 to v0.74.3 and since completing the upgrade I’ve noticed that an App Reload (“r” key) is not restarting the app with the root component/view, and instead loading the current navigation stack as it was prior to the App Reload.
My app uses the Stack layout from react-native-navigation (https://www.npmjs.com/package/react-native-navigation) v7.40.1, along with react-redux (https://www.npmjs.com/package/react-redux) v8.1.0 as a Store Wrapper.
All the app’s state is reset when I perform an App Reload, which is to be expected. But somehow the state of the previous components/views is maintained and reloaded.
Any ideas on how I can perform a true App Reload with everthing reset like I’m starting the app for the first time. I’d like to avoid forcibly closing the app and reopening it every time I need to perform a “Live Reload” of the app.
“Hot Reloading” is working fine when I make small changes to my app, but sometimes I want to reset the app’s state and start fresh with an App Reload and that behavior appears to have changed between React Native versions 0.71.11 and 0.74.3
I’ve tried to reset all the state I can find on App Startup, but somehow the previous components/views are being reloaded on App Reload.
NeonCarnage is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.