watchEffect is one of the ways to track reactive dependencies in Vue3. We write a method with reactive properties, and when one updates, our method triggers.
In this tutorial, we'll build a basic DatePicker component using elements to model data and emit events to a parent component.
The Vue3 Composition API allows for better code organization in large projects. It actually just takes a little bit of more planning to reuse logic.
Looking at the Composition API docs, dependency injection using provide and inject will be a lot more common in Vue 3.0, especially in building Vue3 plugins.