Valora
API Reference@valora-ai/reactindexFunctions

useEnsureCreateLayoutContext

function useEnsureCreateLayoutContext(layoutContext?): LayoutContextType;

Defined in: packages/react/src/hooks/layout/useEnsureCreateLayoutContext.ts:17

A reactive React primitive.

Parameters

ParameterType
layoutContext?LayoutContextType

Returns

LayoutContextType

Example

function LayoutControls({ existingLayoutContext }: { existingLayoutContext?: LayoutContextType }) {
  const layoutContext = useEnsureCreateLayoutContext(existingLayoutContext);
  return <LayoutContextProvider value={layoutContext}><ClearPinButton /></LayoutContextProvider>;
}

On this page

Valora is local-first

No API key, no server — everything in this doc runs on-device.

Star on GitHub