157k views
8 votes
How to trigger watchers on initialization in vue.js ?

User Raeven
by
7.8k points

1 Answer

8 votes

Answer:

variable when the component is mounted. This triggers the watchers which then triggers an emit i have in the watcher. I do not want the emit to happen when the variable is only being initialized. The variable is from the data section of the vue component.

User Slembcke
by
8.2k points

No related questions found