9. Components Actions Mutations State Components methods: { onClickTheButton () { const payload = { ... } this.$store.dispatch( 'theAction', payload, } } } 10. Components Actions Mutations State Components actions: { theAction (context, payload) { const payload = { ... } context.commit( 'theMutation', payload, } } }
![Vuexと入力フォーム](https://cdn-ak-scissors.b.st-hatena.com/image/square/22a3382f1fe0c81a95048eda1d9488cfc2b86d9d/height=288;version=1;width=512/https%3A%2F%2Fcdn.slidesharecdn.com%2Fss_thumbnails%2Fform-with-vuex-170828141440-thumbnail.jpg%3Fwidth%3D640%26height%3D640%26fit%3Dbounds)