Pinia — official state management library for Vue.
Features:
1// stores/counter.ts2import { defineStore } from "pinia"34export const useCounterStore = defineStore("counter", {5 state: () => ({ count: 0 }),6 getters: {7 doubleCount: (state) => state.count * 28 },9 actions: {10 increment() {11 this.count++12 }13 }14})
Benefits over Vuex: