-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
compare original state with reference equality #829
Comments
You can use
|
This is what I end up doing, however, I had to add |
@phryneas turns out it doesn't always work. If I just do Did found a workaround: In Yarn, I have to align the immer version to exactly redux-toolkit is using so that yarn resolves them to the same immer source code inside node_modules. However, the workaround is flaky and since redux-toolkit re-exports some of the immer's functions like |
The current RTK 1.5 uses immer 8.0.0. But yeah, probably we should re-export |
Probably reasonable to re-export that too, yeah. |
I have a reducer created using
createSlice
. Inside one of the case reducer, I'd like to compare with the original state with reference equality. How do I achieve this?The text was updated successfully, but these errors were encountered: