codejump

Plugins & SSR

Preview — 3 of 10 questions

What is the key conceptual change when migrating a Vuex module to a Pinia store?

AReplace every mutation with an action — mutations no longer exist in Pinia
BWrap all actions in dispatch() calls using the Pinia dispatch helper
CConvert each Vuex module to a Pinia store, rename commit to $patch, and remove the mutations key
DConvert getters to computed properties and use setState instead of mutations

What does createTestingPinia from @pinia/testing provide over manual createPinia setup?

AIt provides a test database connection for store persistence testing
BIt creates a Pinia instance with all actions automatically mocked (replaced with empty functions/spies)
CIt generates TypeScript types for stores automatically
DIt is only useful for E2E testing, not unit testing

What information does the Pinia DevTools integration expose, and how does it work?

ADevTools only show the current state — no history or action tracking
BDevTools are only available in development mode via a secret URL
CDevTools show full state tree, action history with arguments and results, state time-travel, and can trigger actions/mutations manually
DPinia DevTools are separate from Vue DevTools and require a different browser extension

Sign up free to play

Answer all 10 questions (7 more), see explanations for every answer, and track your score.