-
Notifications
You must be signed in to change notification settings - Fork 9
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
Error when freeze and ignoreIfNoChange both true #11
Comments
When ignoreIfNoChange is true, setProp() is called early with the input object (which is not the copy and is frozen), and its return value is compared with input object using ===. If no change occurred, iassign() can return early, improving performance. There are two options to solve your problem:
You should use ignoreIfNoChange if you don't know if the setProp() will update your object or not, e.g., a reducer calling another reducer:
|
That sounds reasonable. Thanks! |
Should it be possible to set both freeze and ignoreIfNoChange to true?
When I run the following code using version 1.0.34:
I get this error:
The text was updated successfully, but these errors were encountered: