talalmajali / react-native-countdown-component

React Native CountDown
MIT License
271 stars 234 forks source link

keep the CountDown running even if button pressed #27

Closed iamhaaamed closed 5 years ago

iamhaaamed commented 5 years ago

Hi, is it possible to keep the CountDown running even if the back button pressed and component unmounted?

talalmajali commented 5 years ago

@h4m3d66 it's not the best practice to do this, if you keep the state of the component even when it's unmounted this will cause a memory leak in the app, also you will encounter performance issues with this, the best way to do it, you should render the component again and pass it the new until value