payluk-escrow-inline-checkout/react
subpath. It exposes the useEscrowCheckout hook and an
EscrowCheckoutButton component.
You still call
initEscrowCheckout() once at your app root. The React helpers
read from that single initialization.Initialize at the root
useEscrowCheckout()
The hook exposes the widget’s readiness, an in-flight loading flag, the last
error, and a pay function that mirrors the core
pay() but manages loading and error state
for you.
Returns: UseEscrowCheckoutResult
The hook takes no arguments.
<EscrowCheckoutButton>
A ready-made button that calls pay() on click. Rendering props
(children, disabled, className, title) control the button; the rest are
forwarded to pay().
Props: EscrowCheckoutButtonProps
Next.js & SSR
The widget runs in the browser only. Triggerpay() from a client component in
response to a user action (a click), never during render or on the server; a
server-side call throws BROWSER_ONLY. In the App Router, mark the file with
'use client'.