score:1

the useEffect function allows you to return a function that gets called when a component unmounts. you could use that or call something when the tab changes.

score:2

The CountDown component manages the timer itself and the library author manage to clear the timer when the component unmount https://github.com/talalmajali/react-native-countdown-component/blob/master/index.js#L58


Related Query

More Query from same tag