Vue · Senior · Question 20 of 75
What is cross-request state pollution in Vue SSR?
// store.js
export const state = reactive({ user: null });- ✓Correct answer: A module-level singleton is shared by all requests on the server, so one user's data leaks to another
- 2The client and server render different HTML
- 3Requests are processed out of order
Explanation
On the server, create app, router and stores per request (createApp() factory, app.provide, Pinia per request). Pinia and Nuxt handle this when used correctly.