Watch a specific prop of an object
· ☕ 2 min read
How do you watch a specific prop of an object? Is it useful at all?
Watch is invaluable. It allows us to react to changes in the state and keep it that way through the life cycle of the component.
Creating a watch is pretty simple. Consider the below example where we are monitoring the search text to respond to changes.