electron-vueのテンプレートのvuexの初期エラーの解決策

はじめに

electron-vue のテンプレートに vuex が入ってますがその使い方にクセがあったのでメモしておきます

環境

  • Mac Mojave: 10.14.4
  • vue-electron: 1.0.6

アクションの実行方法

1
this.$store.dispatch("someAsyncTask");

詳しい理由は不明ですが、src/renderer/store/index.js のcreateSharedMutations()をコメントアウトする必要があります。

1
2
3
4
# 修正前
createSharedMutations()
# 修正後
# createSharedMutations()

以上です。

参考

https://github.com/SimulatedGREG/electron-vue/issues/733

electron-vueのテンプレートのvuexの初期エラーの解決策

https://reon777.com/2019/07/23/electron-vue-vuex/

Author

reon777

Posted on

2019-07-24

Updated on

2026-06-30

Your browser is out-of-date!

Update your browser to view this website correctly.&npsb;Update my browser now

×