Pinia is Vue's official state management library. A store contains state shared between components, getters (derived values) and actions (functions that modify it). It avoids passing data down through props over many levels.
Example
export const useCompteur = defineStore('compteur', () => {
const n = ref(0)
return { n }
})