Skip to main content
useCheckout() returns an object whose state properties are reactive Solid getters. Keep the object intact rather than destructuring reactive values.

Installation

Choose the authentication mode:

Checkout-only Solid app

src/App.tsx

Solid app with Storefront SDK

Configure SDK-to-checkout token updates inside session:
src/lib/storefront.ts
Initialize provided mode and guard cleanup:
src/StorefrontBootstrap.tsx
Mount <StorefrontBootstrap /> once near the application root.

Use the primitive

src/CartButton.tsx
Do not destructure reactive state such as const { cartCount } = useCheckout(). Destructuring reads the getter once and can break reactivity. Call methods and read properties through the returned object.
src/AddToCartButton.tsx

SolidStart

Initialize checkout only in the browser lifecycle. Keep server imports free of checkout browser code. When the application uses a Commerce Engine Storefront session, use the appropriate request-bound SSR integration plus provided-mode checkout in a root client component.
src/components/CheckoutBootstrap.tsx
Mount <CheckoutBootstrap /> inside the SolidStart root component. The lifecycle hooks must run under a Solid owner; do not call them at module scope.

Fine-grained signals

For a component that only needs one state value:
Available signal creators include createCartCountSignal and createIsReadySignal.

Primitive API

Production checklist

Production storefront references

Use the multi-framework starters to compare Solid’s client lifecycle with production SSR and edge deployment patterns.