Function: UsePlanComponent()
UsePlanComponent<
Plan
>(__namedParameters
):Element
A convenient way to get a Plan's output Component with usePlanComponent and construct it in one step.
Type Parameters
• Plan extends AnyLexicalPlan
Parameters
• __namedParameters: UsePlanComponentProps
<Plan
>
Returns
Element
Examples
return (
<UsePlanComponent
lexical:plan={TreeViewPlan}
viewClassName="tree-view-output" />
);
const TreeViewComponent = usePlanComponent(TreeViewPlan);
return (<TreeViewComponent viewClassName="tree-view-output" />);