LogoLogo
GitHub repository
GitHub repository
    Documentation
  • Overview
  • Getting Started
  • Guides


  • Hooks


    • useAnimationFrame
    • useMutationObserver
    • useSnackbar
  • Components

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 the init argument whenever a new MutationObserver is created.
  • options: A MutationObserverInit object, as defined by the MutationObserver.observe function.

Returns

No return value.

LogoLogo