Skip to content
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: [vuex] do not mutate vuex store state outside mutation handlers #5

Closed
Camil88 opened this issue Feb 11, 2022 · 6 comments
Closed

Comments

@Camil88
Copy link

Camil88 commented Feb 11, 2022

Hello, I've followed your tutorial thoroughly and wrote similar app in Vue3. The issue is that when I run the app then the following error shows up:

Error: [vuex] do not mutate vuex store state outside mutation handlers

I haven't seen anywhere in your code where you mutate state outside mutation handlers. That's why I don't get it. Has it something to do with Vue3 version?

Extra question: is it possible that you upgrade your code and check if everything work fine in Vue3? I would highly appreciate it.

@rydurham
Copy link
Member

Hello! Thanks for reaching out. My guess is that the problem you are seeing is likely due to some difference with Vue 3, but I am not positive about that. I haven't seen that error in my Vue2 version, but that does not mean there are no bugs there to be reckoned with.

It has been on my list to upgrade this project to Vue 3 for some time, but my workload is such that I am not able to give this much priority at the moment. Hopefully someday I will have the time to work through the upgrade.

@Camil88
Copy link
Author

Camil88 commented Feb 11, 2022

Ok, thank you for your answer.

@Camil88
Copy link
Author

Camil88 commented Feb 16, 2022

I've asked a question on SO and here is one of the working solutions, just for your future reference: https://stackoverflow.com/questions/71083549/why-do-not-mutate-vuex-store-state-outside-mutation-handlers-error-shows-up/71134357#71134357

@rydurham
Copy link
Member

Thank you! I appreciate it.

@rydurham
Copy link
Member

Thank you for your help in looking into this problem. I have now attempted an upgrade to Vue3 in PR #6, making use of the technique discussed in your SO post. So far it seems to be working well. I am going to close this issue for now but feel free to reopen if you would like.

@Camil88
Copy link
Author

Camil88 commented Mar 16, 2022

Great, thanks for all efforts you put into this huge upgrade!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants