State
application state, state management, global state, storeDefinition
The data a user interface is a function of at any moment — what is selected, open, loading, entered, fetched — and, in a front-end framework, the question of where each piece lives: in one component, lifted to a parent, or in a store (Vuex, Pinia) that any component can read and change
The rule that keeps an app sane is as local as possible, as global as necessary: a dropdown’s open flag is the dropdown’s; the signed-in user is everyone’s. Vue’s reactivity makes a ref in a composable a store in all but name, which is why this site has no Pinia store — useAppearance(), useTheme(), useSessionState() are the stores, each owning one concern and persisting it (localStorage, a cookie) itself. Vuex added a discipline (mutations, actions) for the era when that was hard; Pinia kept the devtools and dropped the ceremony. URL state — the resources filter, the kind — is state too, and the most honest kind: it survives a reload and can be shared.
Every bug of the form “it shows the old value” is a state question: who owns it, who is allowed to change it, and who forgot to be told. Answer the first before touching the third.