getComponentSnapshot
An instance method of the Makeswift client that fetches a snapshot of a Makeswift component by its id. This snapshot is only intended to be rendered by <MakeswiftComponent> and <Slot>.
Arguments
The id of the component.
Options for site version and locale.
Untitled
For App Router, this is the return value from calling getSiteVersion. For Pages Router, this is the return value from Makeswift.getSiteVersion.
A valid locale string.
Controls whether a request for a localized component should fallback to the default locale if the requested locale is not available.
Return type
Examples
Basic usage
The following example shows how to fetch a page-specific component snapshot and render it using the <Slot> component within a page.
Localization
The following example uses the locale param to fetch a localized snapshot of a page-specific component.