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
const [targetDate, setTargetDate] = useState<number>(); const [countDown] = useCountDown({ targetDate, }); const rotatingTime = 1; const onResend = () => { if (countDown !== 0) return; setTargetDate(Date.now() + 10 * 1000); setIsRotating(true); setTimeout(() => { setIsRotating(false); }, rotatingTime * 1000); props.onResend?.(); };
这样是可以的,但是改为leftTime就不生效了:
const [leftTime, setLeftTime] = useState(); const [countDown] = useCountDown({ leftTime }); const rotatingTime = 1; const onResend = () => { if (countDown !== 0) return; setLeftTime(10 * 1000); setIsRotating(true); setTimeout(() => { setIsRotating(false); }, rotatingTime * 1000); props.onResend?.(); };
version: 3.8.4
The text was updated successfully, but these errors were encountered:
No branches or pull requests
这样是可以的,但是改为leftTime就不生效了:
version: 3.8.4
The text was updated successfully, but these errors were encountered: