-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
useResetState 并不能准确记录 第一次的初始值 #2306
Comments
目前是有这个问题。但是能否说下,“初始值为随机值,并且 reset 时还需要准确还原为初始随机值”的业务场景吗? |
在业务中,目前没有这个场景呢。 |
最初设计应该没有考虑这种随机值的初始值,但感觉确实没有使用场景,不过也可以修复下,可以来个 PR,或者后面我会处理 |
18 tasks
当初没有考虑到随机数的情况,已提PR,麻烦作者大大review一下啦😬 |
18 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
useResetState 并不能准确记录 第一次的初始值
期望结果,reset应该重置state为第一次渲染时,随机产生的值。
现在,reset会重设为 最近一次重新渲染时,产生的值。
The text was updated successfully, but these errors were encountered: