Home > @plasmicapp/loader-react

loader-react package

Classes

Class Description
InternalPlasmicComponentLoader
PlasmicComponentLoader Library for fetching component data, and registering custom components.

Functions

Function Description
extractPlasmicQueryDataFromElement(loader, lookup, opts)
hydrateFromElement(loader, target, lookup, opts)
initPlasmicLoader(opts)
matchesPagePath(pagePath, lookup)

Check if lookup resolves to pagePath. If it's a match, return an object containing path params; otherwise, return false.

For example, - matchesPagePath("/hello/[name]", "/hello/world") -> {params: {name: "world"}} - matchesPagePath("/hello/[name]", "/") -> false - matchesPagePath("/hello/[...catchall]", "/hello/a/b/c") -> {params: {catchall: ["a", "b", "c"]}} - matchesPagePath("/", "") -> {params: {}}

PlasmicComponent(props)
PlasmicRootProvider(props) PlasmicRootProvider should be used at the root of your page or application.
renderToElement(loader, target, lookup, opts)
renderToString(loader, lookup, opts)
usePlasmicComponent(spec, opts) Hook that fetches and returns a React component for rendering the argument Plasmic component. Returns undefined if the component data is still being fetched.

Interfaces

Interface Description
ComponentRenderData
GlobalVariantSpec
InitOptions

Variables

Variable Description
convertBundlesToComponentRenderData

Type Aliases

Type Alias Description
CodeComponentMeta
PlasmicTranslator