Now that we are done with the setup, we can go back to main.js and start working on our global state.
Inside the new Vuex.Store configuration, we will add a reserved property called state. state is a reactive object that works in a similar way to the local state, data(), so we will redefine the structure of our form here, except, since it's not directly tied to it now, we will rename it user.
Back in main.js, go ahead and set up the following state inside the new Vuex.Store object:
You may be wondering why we are naming our global property that holds the user data as user instead of form as we had it before. First, let me clarify that you are free to name your...