Skip to content

Upgrading vuex 0.3 to 0.4

Breaking0.3.0 → 0.4.2Breaking2New5Changed1Other1

BreakingUpgrade verdict

2 breaking changes.

  • You can no longer call actions through the store object. Instead, import the action in your component and bind it with the new vuex option.
  • Passing mutations as an array to the store constructor no longer works. Use the new modules option to group state and mutations instead.
2 items need code or config changes
Breaking2
Actions are no longer exposed on the store; import them directly in components and bind them with the new vuex option.
vuex
The mutations option no longer accepts an Array when creating a store; use the new modules option for composing state and mutations.
mutationsmodules