State management lets you run a faster application. For a while now, Pinia has replaced Vuex in Vue applications. And with Pinia, it’s time to embrace the Composition API, even within the stores.
Pinia is the recommended state management plugin in Vue applications.
Though you can use it with the “Option API” way, if you are using TypeScript, go for the “Composition API” way. Yes, even within the stores, you can use the setup pattern.