Home > @plasmicapp/loader-react > usePlasmicComponent
usePlasmicComponent() function
Hook that fetches and returns a React component for rendering the argument Plasmic component. Returns undefined if the component data is still being fetched.
Signature:
export declare function usePlasmicComponent<P extends React.ComponentType = any>(spec: ComponentLookupSpec, opts?: {
forceOriginal?: boolean;
}): P;
Parameters
Parameter | Type | Description |
---|---|---|
spec | ComponentLookupSpec | |
opts | { forceOriginal?: boolean; } | (Optional) |
Returns:
P