Skip to content

StoresynkProductProps

Defined in: @storesynk/next/dist/components/StoresynkProduct.d.ts:17

Server-rendered wrapper. Fetches the product at build/SSR time, fills the child Storesynk tags via core’s server transform (titles, prices, images, options, thumbnails, metafields are in the HTML - SEO/no-JS ready), and embeds the raw product (plus any displayed metafields) as a JSON payload the client runtime adopts without re-fetching.

Children must be static host elements - the same tags you’d write on a plain HTML page, unchanged semantics (no client components, no state, no event handlers): they are stringified and injected via dangerouslySetInnerHTML, so React never diffs the subtree the Storesynk engine mutates. Product not found ⇒ the children render untouched and the client behaves as on a static page.

children: ReactNode

Defined in: @storesynk/next/dist/components/StoresynkProduct.d.ts:55


optional className?: string

Defined in: @storesynk/next/dist/components/StoresynkProduct.d.ts:54

Forwarded to the host (layout classes live there).


optional customer?: RestoredCustomerSession | null

Defined in: @storesynk/next/dist/components/StoresynkProduct.d.ts:26

Per-request restored customer session (from getRequestCustomer()) - fills the show-customer-* displayers and renders the customer-pricing widget’s MEMBER state server-side, byte-identical to the client’s own member render. Null passes through safely (anonymous render).


optional fresh?: boolean

Defined in: @storesynk/next/dist/components/StoresynkProduct.d.ts:31

Bypass the persistent cache and fetch live (deduped per request) - for draft/preview reads that must reflect Shopify right now. The default cached path is webhook-invalidated (createStoresynkWebhookHandler), so most routes never need this.


handle: string

Defined in: @storesynk/next/dist/components/StoresynkProduct.d.ts:18


optional locale?: I18nState | null

Defined in: @storesynk/next/dist/components/StoresynkProduct.d.ts:21

Per-request buyer market (from getRequestLocale()); prices/translations render in it. Null passes through safely (config defaults).


optional revalidate?: boolean

Defined in: @storesynk/next/dist/components/StoresynkProduct.d.ts:35

Refetch in the background after adoption and repaint only if the live data differs from the (build-time) payload. For static builds whose prices/stock must self-heal between rebuilds.


optional selectedOptions?: Record<string, string> | null

Defined in: @storesynk/next/dist/components/StoresynkProduct.d.ts:44

Preferred initial selection, usually await searchParams - keys matched case-insensitively against option names, non-option keys ignored, garbage falls back to the default variant. Stamps sync-url on the host so the client derives the SAME selection from the URL at adoption (and mirrors later option clicks back into it). Values must be strings - collapse string[] params before passing.


optional syncUrl?: boolean

Defined in: @storesynk/next/dist/components/StoresynkProduct.d.ts:52

Stamp sync-url without server-side selection (implied by selectedOptions). For static/PPR pages that keep the default variant in the prerendered shell: the client reads the URL at adoption and corrects a shared variant link after hydration, and option clicks mirror into the URL - no request-time searchParams read, so the shell stays static.