State management is one of the topics that keep me thinking since I announced Vue States here on Medium. Which tools and patterns we choose for state management greatly affects the design of our applications.
Current systems like Vuex have their benefits:
[Vuex is] well-integrated with Vue Devtools, offers a lot of useful features like plugins or subscriptions, has well-established best practices and is known by almost every Vue developer (by Filip Rakowski on VueSchool)
However, they have also…
When building universal apps instead of Single-Page Applications (SPAs), there are a lot of things to consider. The code is now not only executed in the browser, but also on a Node.js server. This means for example, that we need to write Universal Code in order to avoid errors like “Uncaught ReferenceError: window is not defined”.
You might have felt like me choosing a state management solution for your Vue.js application: Relieved, that there is exactly one, well designed and officially supported package. One simple decision, where in todays Frontend Development the amount of choices to be made can be overwhelming.
However, with growing experience and bigger-getting applications, it seemed to me that one could develop a new state management for Vue.js that would make enough of a difference to justify one more decision being made.
My attempt to develop such a solution resulted in two plugins: