Skip to main content

Function: usePlanComponent()

usePlanComponent<Props, OutputComponent, Plan>(plan): OutputComponent

Use a Component from the given Plan that uses the ReactPlan convention of exposing a Component property in its output.

Type Parameters

Props extends Record<never, never>

OutputComponent extends ComponentType<Props>

Plan extends OutputComponentPlan<OutputComponent>

Parameters

plan: Plan

A plan with a Component property in the output

Returns

OutputComponent

getPlanConfigFromEditor(useLexicalComposerContext()[0], plan).Component

Defined in

usePlanComponent.tsx:24