Vue · Middle · Question 39 of 75
What is the difference between setup stores and option stores in Pinia?
- ✓Correct answer: Setup stores use a function with refs/computed/functions; option stores use
state,getters,actionsobjects - 2Option stores don't support TypeScript
- 3Setup stores can't have actions
Explanation
Setup stores are more flexible (watchers, composables inside the store) but must return all state for devtools and SSR. Option stores provide $reset() out of the box.