Do You Really Need Vuex?

Let’s see in which cases we need to use a state management pattern like Vuex

Luca Spezzano
NotOnlyCSS

--

Photo by Artem Gavrysh on Unsplash

Nowadays we overuse frameworks and libraries, just because they are popular but not because we need them.

I realized this by looking at the mistakes I made when I started using Vue.js.

At that time I did a lot of research and I noticed that everyone was using Vuex in Vue.js projects, so I started developing my first projects using Vuex too, and I was happy, it worked, it seemed useful and everyone used it, in short, it was cool.

I started using it for everything, even making simple API calls whose data was only used in a single component.

So I would like to help you to understand when it’s the right time to use Vuex.

What is Vuex

Vuex is a state management pattern + library for Vue.js applications. It serves as a centralized store for all the components in an application.

What makes Vuex very powerful is that the components get their data from the Vuex store and can reactively update whenever the store’s data changes.

You can read more here.

When should you use Vuex?

--

--

Luca Spezzano
NotOnlyCSS

Frontend developer focused on CSS architecture of scalable and maintainable large scale projects and the development of amazing user interfaces.