LiveKit LogoDocs
Real-timeEgress/IngressCloudReference

useEnsureLayoutContext

Ensures that a layout context is provided, either via context or explicitly as a parameter. If not inside a LayoutContext and no layout context is provided, an error is thrown.

Import

import { useEnsureLayoutContext } from '@livekit/components-react';

Parameters

#
layoutContext?LayoutContextType

Returns

LayoutContextType;

On this page

ImportParametersReturns

Previous

Chevron IconuseEnsureCreateLayoutContext
LiveKit Logo

Product

SFU

SDKs

Cloud Dashboard

Cloud Status

GitHub Logo