How do I save state in React Native only if the app closes? In android development, a part of an app’s lifecycle is onStop, which permits you the ability to save state once the app is closed. I’m only really talking if the user closes the app on accident, I’d want the current state to be saved to a flat file. I have a backend with Postgres that the app communicates to.
I apologize if there is an obvious answer, currently learning react native.