Vuex
Vuex is preconfigured and enabled by default.
src/
└── store/
├── myModule.js
└── index.js
Vuex is a state management pattern + library for managing global state in Vue applications. Global state is shared between components, and can be further split into modules, persisted across sessions on local storage etc. You can also unit test your getters, mutations, and actions with Jest in isolation from your components.
Alternatives
The Vuex pattern is different from the other parts of your code, and can feel weird or unnecessarily complete. Vuex can be powerful, but you might also consider using services if you're not sure you need it. There are also many authored alternatives out there.
Removing Vuex
If you don't need Vuex, it might be better to just get rid of the extra complexity. It's also fairly easy to add back in later if you need it in the future.
- Remove or comment out the
vuex
import and injection insrc/vendor/vue.js
- Remove the Vuex card from
PageDemo.vue
To completely clean up your codebase:
- Remove
src/vendor/vuex.js
- Remove
src/store/
- Remove
unit/store/
- Remove the alias
@store
fromsrc/config/config.aliases.js