Update Vuex State with Mutations and MapMutations in Vue.js

John Lindquist
InstructorJohn Lindquist

Share this video with your friends

Send Tweet

You commit changes to state in Vuex using defined mutations. You can easily access these state mutations in your template using mapMutations. This lesson shows you have to wire together your Vue.js template with your Vuex store using mutations and mapMutations.

Sergey
Sergey
~ 4 years ago

I don't see how store/index.js is included into component. Shouldn't it be explicitly imported?

Evan Gillogley
Evan Gillogley
~ 4 years ago

Is there any reason why we mutate over copy? Wouldn't copy be 'safer'?