Vue · Senior · Question 45 of 75

Why must setup stores return every piece of state?

Explanation

If you need privacy, return it and treat it as internal by convention, or use a separate private store. Returned refs become state, computed become getters.

Further reading

Problem with a question

Vue · Senior · question 45

Test yourself

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

Take this quiz