Vue · Middle · Question 39 of 75

What is the difference between setup stores and option stores in Pinia?

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.

Further reading

Problem with a question

Vue · Middle · question 39

Test yourself

Take the Vue · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz