On my Android device, I've noticed that when I exit the application using the hardware back button, the componentWillUnmount function is triggered. However, if I use the square button to show the list of running apps and swipe to close it, the function does not get called.
Is there a way to detect when the app is being closed in order to clear timers, save data, etc.?
Appreciate any suggestions. Thank you.