react-native-element-timer icon indicating copy to clipboard operation
react-native-element-timer copied to clipboard

Countdown resets on every setState

Open mchriss opened this issue 3 years ago • 3 comments

Every time when there is a re-render on the page, the Countdown component resets itself, making it unusable with custom buttons or any other dynamic element. Any suggestion how to fix this?

mchriss avatar Aug 26 '22 06:08 mchriss

hi @mchriss , I don't know exactly how your lines of code are? maybe after the change state you did there was a container wrapped outside the re-render.

hoaphantn7604 avatar Sep 08 '22 02:09 hoaphantn7604

hi @mchriss , This issue is resolved. Please install later version.

hoaphantn7604 avatar Sep 15 '22 10:09 hoaphantn7604

I'm reopening this issue, because now I can't even get the Countdown working.. when I call the ref.current.start() function, I get the following error: TypeError: null is not an object (evaluating 'RNBackgroundTimer.setTimeout')

mchriss avatar Nov 07 '22 17:11 mchriss