-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
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
[feature] useTimeout 是否可以考虑 return timer #1615
Comments
我觉得可以加一个取消定时器的返回函数,你觉得呢 @brickspert |
|
如果把
|
18 tasks
同意第二点,第一点不一定,因为取消的时候往往是依赖于其他的 state 去取消的,大多数情况是不需要多声明一个状态的。 不过最终建议还是 加一个 clear。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
期望
useTimeout
返回timer
,方便调用者可以手动取消定时器The text was updated successfully, but these errors were encountered: