useMutationObserver
Creates a MutationObserver that calls a callback when the DOM of the observed element changes.
Arguments
targetRef: A React ref to the element to observe.callback: A function to be called on mutation. Additionally, it will be called immediately with theinitargument whenever a new MutationObserver is created.options: A MutationObserverInit object, as defined by the MutationObserver.observe function.
Returns
No return value.