A utility that creates a function that calls multiple functions in order.
...callbacks(T | undefined)[]| Prop | Type | Default |
|---|---|---|
...callbacks | (T | undefined)[] | - |
chainedFunction(...args: Parameters<T>) => void| Prop | Type | Default |
|---|---|---|
chainedFunction | (...args: Parameters<T>) => void | - |
import { chain } from '@k8ordo/ui';<button
onClick={chain(
() => playRipple(),
onClick,
() => trackAnalytics(),
)}
/>