use-mutation-observer
Subscribe to changes being made to the DOM tree
Source
Docs
PackageIcon
Usage
The use-mutation-observer hook is a wrapper for the MutationObserver.
It allows you to subscribe to changes being made to the DOM tree.
Last detected mutation: Not mutated yet
Target element
If you cannot pass a ref to the target element, you can pass a function to resolve
the target element as the third argument.
Press Ctrl + Shift + L to change direction
Direction was changed to: Not changed yet