Error: do not mutate vuex store state outside mutation handlers
See original GitHub issueHi!
I’m trying to add vuex-multi-tab-state to an existing project and stuck with an error:
Error: do not mutate vuex store state outside mutation handlers
It’s hard to provide a minimal example, but I found a possible cause.
If change to
return mergeWith({}, oldState, newState, mergeCustomizer);
(create a new one object instead of change original)
the error doesn’t happen.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:14 (7 by maintainers)
Top Results From Across the Web
Vuex - Do not mutate vuex store state outside mutation handlers
Error [vuex] Do not mutate vuex store state outside mutation handlers. What does it mean? It happens when I try to type in...
Read more >Error: form binding with Vuex - Do not mutate vuex store state ...
The problem I'm seeing is that as soon as the a bound form field changes, it triggers the error: Do not mutate vuex...
Read more >Vuex - Do not mutate vuex store state outside mutation handlers
Getting error but not find where and why ? vue page.
Read more >[vuex] Do not mutate vuex store state outside mutation handlers.
I am trying to get the top 5 products in the product array but this code which I am trying to access the...
Read more >Error: [vuex] Do not mutate vuex store state outside ... - GitHub
I upgrade to the latest version(v1.0.0-rc11),how to handle the error? This question is available on Nuxt.js community (#c1713)
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 FreeTop 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
Top GitHub Comments
As you pointed out, the function mergeWith was mutating the store state directly. This is fixed now and v1.0.13 has been released! Thank you again for reporting the issue!
Any update? I’m facing the same issue with Nuxt and vuex-multi-tab-state version ^1.0.16.