Skip to main content
useThrottledDailyEvent(params): void Listeners are automatically torn down when the calling component or hook unmounts. Unlike useDailyEvent, the callback receives an array of all events accumulated during the throttle window. The queue is cleared when daily-js emits 'call-instance-destroyed'.

Parameters

string | string[]
required
The daily-js event(s) to register.
Function
required
A memoized callback reference to run when the event(s) get emitted.
integer
default:"100"
The minimum waiting time until the callback is called again.
The callback param has to be a memoized reference (e.g. via useCallback). Otherwise a console error might be thrown indicating a re-render loop.

Return value

void

Example

Example for multiple events

See also