MutationObserverResult
interfaceSource L17Type contract for MutationObserverResult.
interface MutationObserverResultMembers
| Name | Type |
|---|---|
records | MutationRecord[] |
supported | boolean |
Open-code aq-ui React hook for Use Mutation Observer.
pnpm dlx aq-ui@alpha add use-mutation-observerImport the parts you need, then jump to an export for its contract.
"use client"
import { useMutationObserver } from "@/hooks/use-mutation-observer"Type contract for MutationObserverResult.
interface MutationObserverResult| Name | Type |
|---|---|
records | MutationRecord[] |
supported | boolean |
Open-code aq-ui React hook for Use Mutation Observer.
function useMutationObserver<T extends Node>(target: Target<T>, observerOptions: MutationObserverInit, { enabled = true, onMutate }: UseMutationObserverOptions = {}): MutationObserverResultMutationObserverResult| Name | Type | Default |
|---|---|---|
target | Target<T> | — |
observerOptions | MutationObserverInit | — |
options? | UseMutationObserverOptions | {} |
Type contract for UseMutationObserverOptions.
interface UseMutationObserverOptions| Name | Type | Default |
|---|---|---|
enabled? | boolean | true |
onMutate? | (records: MutationRecord[]) => void | — |
hook-observer-pools, hook-target, use-stable-callback