According to Vue3 Doc, watchEffect
will stop when a component is unmounted.
When watchEffect is called during a component's setup() function or lifecycle hooks, the watcher is linked to the component's lifecycle and will be automatically stopped when the component is unmounted.
Does watch
has the same behavior in term of automatically stoppage? Thanks!