We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Basically as titled, set the timer for 1:10, wait for a bit, and it'll stuck at 0:59.
The whole component is simple enough so I just copy/pasted it so it'll work without minute, and reformat the output.
useEffect(() => { let countDown: number; if (isTimerActive) { countDown = setInterval(() => { if (seconds > 0) { setSeconds((seconds) => seconds - 1); } }, 1000); } if (!seconds) { setIsTimerActive(false); } return () => clearInterval(countDown); }, [seconds, isTimerActive]);
and
<Text style={props.timerStyle}> {Math.floor(seconds / 60)}: {(seconds % 60) < 10 ? `0${(seconds % 60)}` : (seconds % 60)} </Text>
I can do a PR for this, or you should fix the setInterval function.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Basically as titled, set the timer for 1:10, wait for a bit, and it'll stuck at 0:59.
The whole component is simple enough so I just copy/pasted it so it'll work without minute, and reformat the output.
and
I can do a PR for this, or you should fix the setInterval function.
The text was updated successfully, but these errors were encountered: