FormCartActions
Set of FormData-driven server actions returned by .
Each method parses and validates a FormData payload before delegating to the
typed action surface, enabling native <form action={…}> wiring that works
without JavaScript while sharing the same server-side validation path as
progressively enhanced calls.
Properties
Example
const formActions = createFormCartActions({ typed });
// In a Server Component:
<form action={formActions.addLineAction}>
<input name="variantId" value="gid://shopify/ProductVariant/123" />
<button type="submit">Add to cart</button>
</form>Related
AuthBridge CartIdStorage CreateTypedCartActionsOpts HttpOnlyCookieStorageOpts NextEventBridge TypedCartActions NextEventBridgeHandlers createCartEnsurer
createTypedCartActions
Builds the typed, JSONarg serveraction surface for cartnext hosts. Each returned method threads the supplied idempotencyKey into via resolveContext({ idempotenc
HttpOnlyCookieStorageOpts
Options bag for . Every field is optional — the factory applies defaults tuned for a Shopifystyle stickycart: 180day maxAge, sameSite=lax, secure in production,