Although this course was developed with Vue 2, the syntax for Vue 3 with Vuex is virtually the same.
Now that we have access to our Vuex State, we can start to store our application’s data there. With Vuex, we can achieve this by using a Mutation to place data in our State. In this tutorial, we’ll look at Mutations and then see how we can wrap Mutations in Actions to make them more scalable and future-proof.
As we discovered in the Intro to Vuex lesson, we can use Mutations to update, or mutate, our State.
For a simple example, let’s say our State has a