Home > @plasmicapp/loader-react > PlasmicComponentLoader > maybeFetchComponentData

PlasmicComponentLoader.maybeFetchComponentData() method

Like fetchComponentData(), but returns null instead of throwing an Error when a component is not found. Useful when you are implementing a catch-all page and want to check if a specific path had been defined for Plasmic.

Signature:

maybeFetchComponentData(...specs: ComponentLookupSpec[]): Promise<ComponentRenderData | null>;

Parameters

Parameter Type Description
specs ComponentLookupSpec[]

Returns:

Promise<ComponentRenderData | null>