Back to Developer Roadmap

Watchers

src/data/roadmaps/vue/content/watchers@kdlXhbw_a81xdZtyK-pVa.md

4.0534 B
Original Source

Watchers

Computed properties allow us to declaratively compute derived values. However, there are cases where we need to perform "side effects" in reaction to state changes - for example, mutating the DOM, or changing another piece of state based on the result of an async operation. With Composition API, we can use the watch function to trigger a callback whenever a piece of reactive state changes.

Visit the following resources to learn more: