How do I respond to an app state change? (React Native)
<p>I want to save the state of my app when the system decides to kill it randomly (when for example it was in the background for a long time). How do I intercept the OS's request to shutdown before my state is lost?</p>