-
-
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
immer maximum call stack size exceeded #925
Comments
This actually has nothing to do with Immer. It's the Just how deeply nested is your state? If you really need to, you can turn off the mutation check: https://redux-toolkit.js.org/api/getDefaultMiddleware#customizing-the-included-middleware |
my object is google map |
Ah, that's the problem. You're trying to put non-serializable values with circular references into the Redux store, which you should not be doing: https://redux.js.org/style-guide/style-guide#do-not-put-non-serializable-values-in-state-or-actions That's causing the immutability middleware to infinitely recurse through that object. If you stop putting that Google Map object into the Redux store, you'll stop getting this error. |
reopening this as I face same issues (I try to store dereferences JSONSchema) I already disable serializableCheck as of course it is not serializable. this is their problematic code:
They have a checkedObjects param to detect this, but it seems not to work. Disabling the mutation is not an option for me. I just want to avoid people to modify the data from the the UI part |
oh wait there's an error in your code in fact |
i faced with "maximum call stack size exceeded" with createSlice when i want to update state with a very deeply nested object.
i don’t have this issue when i use pure redux
because the object it very deep, immer face this issue for immutability check
is there any solution to turn of immer for particular action?
The text was updated successfully, but these errors were encountered: