I tried using a useEffect hook in the App component like this:
useEffect(() => {
console.log('App mounted');
return () => {
console.log('App unmounted');
};
}, []);
However the console doesn't show the App unmounted message. Tested on an Android device with a blank app. The way I closed the app was by pressing ||| on the tablet and then Close All.