UNPKG

rooks

Version:

Collection of awesome react hooks

14 lines (13 loc) 508 B
import type { CallbackRef } from "../utils/utils"; /** * * useMutationObserverRef hook * * Returns a mutation observer for a React Ref and fires a callback * * @param {MutationCallback} callback Function that needs to be fired on mutation * @param {MutationObserverInit} options * @see https://rooks.vercel.app/docs/hooks/useMutationObserverRef */ declare function useMutationObserverRef(callback: MutationCallback, options?: MutationObserverInit): [CallbackRef]; export { useMutationObserverRef };