Build an Online Shop with Vue And Laravel Part 8.1 - Implement Vuex
After learn how to call API, in this article we will learn how to implement vuex as state management to Vue.js project. If you are have been playing with vuejs then you have probably come across vuex, if not then here is what it is.
What is Vuex
Vuex is a state management library that can help us manage the state of our applications. Instead of multiple components handling state locally and passing them to the required components, we can use Vuex to manage state for the entire application in one location.
It’s the best used with Vuejs, but is not limited for Vuejs. We can use it with Reactjs.
Chapters
- Build an Online Shop with Vue And Laravel Part 1
- Build an Online Shop with Vue And Laravel Part 2 - Create Table
- Build an Online Shop with Vue And Laravel Part 3 - Rest API
- Build an Online Shop with Vue And Laravel Part 4 - Home Page
- Build an Online Shop with Vue And Laravel Part 5 - Product Detail Page
- Build an Online Shop with Vue And Laravel Part 6 - Cart and Success Page
- Build an Online Shop with Vue And Laravel Part 7 - Consume RESTful API Using Axios
- Build an Online Shop with Vue And Laravel Part 8.1 — Implement Vuex [ you’re here]
For this article, I will provide repository links
Pre-request
To follow along with this article, you will need to read vuex documentation and how to separating state management by gitlab development docs.
Vuex File structure
Separate these concerns into different files to improve readability,
In my next article, I’ll explain how to implement vuex mutations, actions and getters in these apps series.
Thank you.