Pinia, The New (and better) State Management System For Vue

Nicky Christensen
Vue.js Developers
Published in
6 min readMay 21, 2022

--

If you haven’t heard about Pinia yet or considering switching from Vuex to Pinia, this article might help you.

Pinia Logo — A Vuex alternative

I’ll try to give you a proper introduction to the new State Management System, Pinia for Vue. Why I think it’s a great tool, and why you should be using it today.

What is Pinia

Pinia is a new store/state management system for Vue. This is a great tool for when wanting to share data between components in your application. One of the reasons for using a tool like Pinia (or Vuex for that matter) is that throwing events around and listening for these events in your application can easily become quite messy and unstructured. State management systems like Pinia (Vuex, Redux, etc.) can help solve this.

Pinia is now also the recommended choice by Vue and is now an official part of the whole Vue ecosystem, maintained and developed by core members of the Vue team. Last but not least, Pinia is super lightweight, only 1kb in size which is freaking awesome.

Why do we need Pinia?

If you have been in the Vue community, you will know the preferred choice has been Vuex when talking about state management and the community has been very happy using it, so why do we actually need Pinia? Well… Vuex can be…. a hassle to…

--

--

Nicky Christensen
Vue.js Developers

FE Lead at Rig.dev - A danish guy who speaks about frontend, tech & leadership - Follow & connect @ https://www.linkedin.com/in/dknickychristensen/