Skip to main content
useDailyEvent(params): void Listeners are automatically torn down when the calling component or hook unmounts.

Parameters

event
string
required
The daily-js event to register.
callback
Function
required
A memoized callback reference to run when the event is emitted.
The callback param has to be a memoized reference (e.g. via useCallback). Otherwise a console error might be thrown indicating a potential re-render loop.

Example

See also