@atlaskit/onboarding
Version:
An onboarding spotlight introduces new features to users through focused messages or multi-step tours.
17 lines (16 loc) • 591 B
TypeScript
/**
* A hook that watches for changes to a node and forces a re-render when it changes.
*
* @param element The node to watch for changes.
* @param opts Options for the hook.
* @param [opts.disableWatch=false] Whether to watch for changes or not.
* @param [opts.onChange] A callback that is called when the node changes.
*
* @returns A version number that is incremented when the node changes to force a re-render.
*
* @internal
*/
export declare function useElementObserver(element: Node, opts?: {
disableWatch?: boolean;
onChange?: (version: number) => void;
}): number;