State Management · Junior · Question 36 of 75
Does a Zustand store require a Provider component?
- ✓Correct answer: No: the store is a hook created at module level
- 2Yes:
<ZustandProvider>must wrap the whole app - 3Yes, but only in production builds
Explanation
That's one of Zustand's selling points. The flip side: a module-level store is shared by everything that imports it - on the server (SSR) you need a store per request, which the Next.js guide shows via Context.