Skip to main content
Reeple touches window and the DOM, so it must run client-side only. It will throw during server-side rendering if instantiated at module scope or in a server component.

App Router

Mark the component 'use client' and use the same useReeple hook as the plain React example:
app/checkout/CheckoutButton.tsx

Pages Router

If you’d rather avoid 'use client'-style boundaries, dynamically import the component with SSR disabled:
pages/checkout.tsx
components/CheckoutButton.tsx is the same component shown in the React example — no 'use client' directive needed here since ssr: false already guarantees it only renders in the browser.