【vuex】Do not mutate vuex store state outside mutation handlersがでた
概要
以下のエラーが出たのでメモ。
Do not mutate vuex store state outside mutation handlers
解決方法
私はnuxtを使っているので純vuexではどうなのかわからないが、storeを管理しているエントリ部( store/index.js
)の先頭で以下を記述する。
export const strict = false