activator

DOM
stable

Wire an activator element (identified by IActivatorProps.activator) to a component's event bindings. Watches for prop changes to rebind or unbind events reactively, and cleans up on scope disposal.

API

Signature

Full TypeScript signature sourced from the util file.

typescript

API

Parameters

Input parameters accepted by this util.

props
required
IActivatorProps
Component props containing the activator selector and optional activatorProps to bind.
vm
required
ComponentInternalInstance
The calling component's internal instance, used to resolve "parent" selectors.
{activatorEl, activatorEvents}
required
Pick<ReturnType<typeof useActivator>, 'activatorEl' | 'activatorEvents'>

API

Return value

The value returned by this util.

Sets up watchers and scope disposal. Returns nothing — side effects only.