Skip to content
Function

useMutationObserver

Watch DOM changes inside an element.

See useMutationObserver with a live demo

@danixsoft/hooks


useMutationObserver(ref, callback, options?): void

Parameters

ref

RefObject<HTMLElement | null>

callback

MutationCallback

options?

MutationObserverInit = ...

Returns

void