StoresynkProductProps
Defined in: @storesynk/next/dist/components/StoresynkProduct.d.ts:17
Server-rendered
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.
Properties
Section titled “Properties”children
Section titled “children”children:
ReactNode
Defined in: @storesynk/next/dist/components/StoresynkProduct.d.ts:55
className?
Section titled “className?”
optionalclassName?:string
Defined in: @storesynk/next/dist/components/StoresynkProduct.d.ts:54
Forwarded to the
customer?
Section titled “customer?”
optionalcustomer?: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).
fresh?
Section titled “fresh?”
optionalfresh?: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
Section titled “handle”handle:
string
Defined in: @storesynk/next/dist/components/StoresynkProduct.d.ts:18
locale?
Section titled “locale?”
optionallocale?: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).
revalidate?
Section titled “revalidate?”
optionalrevalidate?: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.
selectedOptions?
Section titled “selectedOptions?”
optionalselectedOptions?: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.
syncUrl?
Section titled “syncUrl?”
optionalsyncUrl?: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.