Skip to main content
useCallFrame(): DailyCall When manually managing call frame instances in React, it’s easy to run into issues like Error: Duplicate DailyIframe instances are not allowed, especially in React’s Strict Mode. useCallFrame() handles that for you.

Parameters

useCallFrame accepts the same configuration options as createFrame().
parentElRef
MutableRefObject<HTMLElement>
If specified, Daily’s iframe will be appended to the referenced element. Otherwise it will be appended as a child of document.body.
options
DailyFactoryOptions
Contains all factory properties that are passed to createFrame(). Check DailyCall properties for details.
shouldCreateInstance
Function
Optional callback function with a boolean return to control when the call frame instance should be created.

Return value

DailyCall
The DailyCall instance. Wraps createFrame().

Example

See also

Components

daily-js methods