useComposedHandlers

Composes multiple event handlers into a single handler function.

Combines multiple event handlers into a single function that calls them all in sequence. Undefined handlers are safely skipped, making it ideal for merging internal and user-provided event handlers.

Import#

import { useComposedHandlers } from '@volue/wave-react';

Example#


API Reference#

Arguments#

Prop
Type
Default
...handlers
(EventHandler | undefined)[]

Returns#

EventHandler — A referentially stable event handler that invokes all provided handlers in sequence when called.