We love Reactjs, but it is indeed too complex when you need to call a global variable.
So can Vue.js make it more simple than redux?
Let’s have a look together! First I want you to have a basic understanding of Vue, you need to know how to use Vue CLI to create an empty project.
Then you have to understand the basic structure of a Vue project, I mean template, script, CSS.
Finally, I need you to take a look at https://medium.com/js-dojo/vuex-2638ba4b1d76.
You should put every asynchronous operation in it, for example: fetch API . In the previous article in this series we discussed what a store is, why it's useful, and when it's a good time to implement one.
With those principles in mind, we can now look into how to implement a store with Vuex. Vuex is the official store library and state management pattern for Vue.js.