Updating notification throws state mutation error with redux-toolkit
See original GitHub issueDescription
When updating notification, redux-toolkit throws error : Invariant failed: A state mutation was detected between dispatches, in the path 'notifications.0.status'
I had to disable immutableCheck middleware for notifications in redux store.
Expected behavior
Dispatching notify should return a new object instead of state reference, I suppose.
Steps to reproduce the bug
Configuring store as the documentation
Environment
- OS name and version : MacOS 10.15.7
- Browser name and version: All
- Reapop version: 3.0.4
Additional information
- I can fix this bug
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Error Handling | Redux Toolkit
If your query or mutation happens to throw an error when using fetchBaseQuery, it will be returned in the error property of the...
Read more >React and Redux: Uncaught Error: A state mutation was ...
Solved the problem with state mutations by following any of the update patterns suggested on redux official docs.
Read more >RTKQ: Mutation gets stuck in 'Pending' despite rejection from ...
Hi,. On multiple places, since I've updated our package the mutation is stuck on 'Pending' even when an error is thrown.
Read more >Robust React App Notification System using MUI and Redux ...
Create A Robust Notification System For Your React App In Less Than 100 Lines Of Code. Using Redux toolkit, MUI, and React hooks, ......
Read more >Centralizing API error handling in React apps - ITNEXT
That would involve using apollo-link-state and dispatching a mutation just for the freaking status code update. With this in mind, let's take a ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

👋 guys, new version should fix this problem. Please re-open the issue if you still have an issue.
Hello, I get mutation error updating notification in Class component.