roadmap
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
Prepare for Pinia interviews on state in Vue apps, from defining a store to plugins and server rendering. Covers state, getters and actions, store testing and moving an app from Vuex.
95 of 95 questions in your plan: 0 known, 0 in progress, 0 due, 0 skipped, 95 new. 0 cut, outside your plan.
Pinia rarely gets a round of its own. It surfaces in Vue frontend loops, inside the framework conversation or the review of a take-home, as soon as data has to outlive one component: a cart badge in the header, a signed-in user that a router guard checks. Interviewers usually hand you a small store and ask what breaks: a badge that stops updating after `items` was pulled out of the store with plain destructuring, a `$reset()` call that throws on a setup store, a store read at the top of the router module before `app.use(pinia)` has run. Early questions check that you can write and read a store correctly: option store or setup store, `storeToRefs`, when `$patch` takes a function instead of an object. From middle level up the scenarios move to the edges of the store. Two setup stores that call each other, a `$subscribe` listener that goes quiet once its component unmounts, a plugin whose added property never reaches the serialized state. Senior candidates are expected to explain why a server must create one pinia per request, how to type a custom store option for a plugin, and how to move a large Vuex codebase across one module at a time while both stores still run.
A store is easier to reason about once you know what any store owes its readers, so the plan opens framework-neutral, with [stores and subscriptions](/topics/fe-ui-frameworks-concepts-state-stores-subscription) and [derived values](/topics/fe-ui-frameworks-concepts-state-derived-values-memo). Vue's own machinery follows, because a Pinia store is a reactive object and most of its surprises are reactivity surprises. [Ref and reactive](/topics/fe-vue-reactivity-ref-reactive) and the [destructuring rules](/topics/fe-vue-reactivity-destructuring) explain why `storeToRefs` exists, [raw state](/topics/fe-vue-reactivity-shallow-raw) explains `markRaw` in plugins, and [computed caching](/topics/fe-vue-computed-watchers-computed) is what a getter is built on. Composition Patterns makes the case for a store before Pinia appears. A setup store is a [composable](/topics/fe-vue-composition-api-composables) run once inside an [effect scope](/topics/fe-vue-reactivity-effect-scope); a [module-level reactive store](/topics/fe-vue-composition-api-shared-state) shows what you get without a library and where it stops being enough; and the app plugin contract is how `app.use(pinia)` installs one. The Core Store API is the product itself, in the order you write a store: [declare it](/topics/fe-pinia-defining-stores), decide how its state is [changed and watched](/topics/fe-pinia-state), then derive from it and act on it. [Plugins](/topics/fe-pinia-plugins) come next, since a plugin sees every store at once and only makes sense once one store does. The last stretch moves the store into harder settings. Server Rendering begins with [code that is safe on a server](/topics/fe-vue-ssr-ssr-safe-code), where a shared module-level object leaks one visitor's data to the next, before [Pinia's own SSR and hydration](/topics/fe-pinia-ssr-outside). Testing starts with how a mounted component receives [its global plugins](/topics/fe-vue-testing-global-config), because that is where a [testing pinia](/topics/fe-pinia-testing) gets passed in. Leaving Vuex comes last: [migration](/topics/fe-pinia-vuex-migration) reads best once every Pinia concept it maps onto is familiar.
If Pinia is one line on a Vue job post and the interview is close, put the Core Store API first, then plugins and SSR, and leave the Vue reactivity stretch for the gaps your answers show; switching study order to by topics keeps the store modules together. Coming from Vuex, start with the migration module: it names what disappeared, mutations and nested modules, and sends you back to the store chapters for what replaced them. For a senior role, narrow level to senior and principal and give most of the time to server rendering, plugins and testing, where the deeper follow-ups tend to sit. This plan treats Vue only as far as stores lean on it. Components, templates, routing and Nuxt's own data fetching belong to the [Vue roadmap](/roadmaps/vue), the place to go when the interview covers the whole framework.
Pinia rarely gets a round of its own. It surfaces in Vue frontend loops, inside the framework conversation or the review of a take-home, as soon as data has to outlive one component: a cart badge in the header, a signed-in user that a router guard checks. Interviewers usually hand you a small store and ask what breaks: a badge that stops updating after items was pulled out of the store with plain destructuring, a $reset() call that throws on a setup store, a store read at the top of the router module before app.use(pinia) has run.
Early questions check that you can write and read a store correctly: option store or setup store, storeToRefs, when $patch takes a function instead of an object. From middle level up the scenarios move to the edges of the store. Two setup stores that call each other, a $subscribe listener that goes quiet once its component unmounts, a plugin whose added property never reaches the serialized state. Senior candidates are expected to explain why a server must create one pinia per request, how to type a custom store option for a plugin, and how to move a large Vuex codebase across one module at a time while both stores still run.
A store is easier to reason about once you know what any store owes its readers, so the plan opens framework-neutral, with stores and subscriptions and derived values. Vue's own machinery follows, because a Pinia store is a reactive object and most of its surprises are reactivity surprises. Ref and reactive and the destructuring rules explain why storeToRefs exists, raw state explains markRaw in plugins, and computed caching is what a getter is built on.
Composition Patterns makes the case for a store before Pinia appears. A setup store is a composable run once inside an effect scope; a module-level reactive store shows what you get without a library and where it stops being enough; and the app plugin contract is how app.use(pinia) installs one.
The Core Store API is the product itself, in the order you write a store: declare it, decide how its state is changed and watched, then derive from it and act on it. Plugins come next, since a plugin sees every store at once and only makes sense once one store does.
The last stretch moves the store into harder settings. Server Rendering begins with code that is safe on a server, where a shared module-level object leaks one visitor's data to the next, before Pinia's own SSR and hydration. Testing starts with how a mounted component receives its global plugins, because that is where a testing pinia gets passed in. Leaving Vuex comes last: migration reads best once every Pinia concept it maps onto is familiar.
If Pinia is one line on a Vue job post and the interview is close, put the Core Store API first, then plugins and SSR, and leave the Vue reactivity stretch for the gaps your answers show; switching study order to by topics keeps the store modules together. Coming from Vuex, start with the migration module: it names what disappeared, mutations and nested modules, and sends you back to the store chapters for what replaced them. For a senior role, narrow level to senior and principal and give most of the time to server rendering, plugins and testing, where the deeper follow-ups tend to sit.
This plan treats Vue only as far as stores lean on it. Components, templates, routing and Nuxt's own data fetching belong to the Vue roadmap, the place to go when the interview covers the whole framework.