-
-
Notifications
You must be signed in to change notification settings - Fork 961
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
Value not updating with UseState == #619
Comments
I've been thinking about this more. I don't think there is any way to resolve this problem while keeping the Deref behavior and not panicking if the value is currently mutably borrowed on PartialEq, Add, etc implementations which is the main difference between UseState and UseRef... We either need to give up that behavior and unify UseState and UseRef or keep the behavior and leave odd updating behavior as a footgun. If we keep the behavior we need to update the documentation to state that the value is only valid before writes instead of only warning it is invalid in futures. |
Problem
Expected behavior
The count should be 1 and the program should not panic.
Environment:
master
and0.2.4
1.65.0
The text was updated successfully, but these errors were encountered: