Vue · Senior · Question 44 of 75

What is the difference between $subscribe and a watch on store state?

Explanation

Subscriptions added inside a component are removed when it unmounts unless detached is set. $onAction is the equivalent for actions.

Further reading

Problem with a question

Vue · Senior · question 44

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