Vue · Junior · Question 50 of 75
What do you need to do before using any Pinia store?
- ✓Correct answer: Install the plugin:
app.use(createPinia()) - 2Nothing - stores work without setup
- 3Wrap the app in a
<PiniaProvider>component
Explanation
Calling a store hook before the Pinia instance is installed throws an error about no active Pinia. In SSR a new Pinia instance is created for each request.