Links tagged: vuex
Vuex getters are great, but don’t overuse them - codeburst
As it states in the Bunny Theory of Code, the code tends to multiply in a quick way. And even with such great tools as Vue and Vuex it’s easy to make a mistake that might grow later all over the project. Here I will talk about Vuex and its getters, and how they might be used in a wrong way. And while dealing with that, I tried to figure out what Vuex getters are good for and how they work under the hood.
October 28th 2019
Application Structure | Vuex
Vuex doesn't really restrict how you structure your code. Rather, it enforces a set of high-level principles:Application-level state is centralized in the store.The only way to mutate the state is by committing mutations, which are synchronous transactions.Asynchronous logic should be encapsulated in, and can be composed with actions.As long as you follow these rules, it's up to you how to structure your project. If your store file gets too big, simply start splitting the actions, mutations and getters into separate files.
October 8th 2019