Other Approaches to Organizing Your Vuex Stores
While the previous two approaches should give you some good options for managing your Vuex store, there are a few other options you may wish to consider as well.
Vuex Pathify
Vuex Pathify (https://davestewart.github.io/vuex-pathify/) is a utility that makes it easier to access the Vuex store via a path API. So, for example, a store with a module called resume
and a state
value of jobs
can be accessed like so: store.get('resume/jobs')
. Basically, it creates a shortcut for reading and writing values to the store and simplifying synchronization. Fans of XPath will love this.
Vuex Module Generator (VMG)
VMG is a library that adds basic Create, Read, Update, Delete (CRUD) operations to your store to save you from rewriting common logic. You can import the library's features and then add them to your state
, mutations
, and actions
. Anyone who has been in web development for any amount of time is familiar with the CRUD...