[**@wocart/storefront v3.1.0**](../../README)

***

[@wocart/storefront](../../README) / [astro](../README) / runFormAction

# Function: runFormAction()

> **runFormAction**\<`TResult`, `TSerialized`\>(`deps`): `Promise`\<`TResult`\>

Run an action called from an HTML form and store its result for the page
this POST renders. Resolves to that result, or `undefined` when the request
is not a form-called action (a JSON call or a plain request is Astro's).

## Type Parameters

### TResult

`TResult` *extends* `ActionHandlerResult`

### TSerialized

`TSerialized`

## Parameters

### deps

[`ActionMiddlewareDeps`](../interfaces/ActionMiddlewareDeps)\<`TResult`, `TSerialized`\>

## Returns

`Promise`\<`TResult`\>
