Skip to content
Advertisement

Object(…) is not a function for Vuex Store

I’m in Vue 3, I started with adding a new Vuex.Store to vue, but I continuously get this javascript error. I also tried the same thing with createStore since I use Vue 3, but it’s still the same.

What am I missing?

JavaScript

Than I add to Vue as store:

JavaScript

What am I missing?

Complete error

JavaScript

Advertisement

Answer

If you are using Vue 3 you need to use Vuex 4.

JavaScript

https://vuex.vuejs.org/guide/#vuex-4-x-for-vue-3

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement