Full-Stack Web Development with Vue.js and Node

(singke) #1
Introducing Vuex Chapter 8

That's it. Now, if you reload the browser, you should be able to see the following result:


The count should increase or decrease when you click on the relevant button. This gives


you a basic idea about how to implement Vuex in an application.


Installing and using Vuex in a movie application


We covered the basics of Vuex—how it works in an application and the core concepts. We


covered how to create a store and mutations and how to use actions to dispatch them, and
also discussed how to use getters to fetch information from the store.


We built an application in the previous chapters for a movie listing page. We will use the


same application for Vuex. We will be doing the following actions:


We will define a store where all the movies will be stored
When a new movie is added, we will automatically display that to the movie
listing page without reloading the page
Free download pdf