AsyncHandlerContext
Defined in: types.ts:137
The last argument every async handler receives, after the action’s own arguments.
Type Parameters
Section titled “Type Parameters”| Type Parameter | Default type |
|---|---|
TState | any |
Properties
Section titled “Properties”| Property | Type | Description | Defined in |
|---|---|---|---|
getState | () => TState | The current state, read when called. Use it to read what to send (getState().form) instead of putting state in the action, where it would be the value from the render that built the handler. Call it again after an await to see changes made meanwhile. | types.ts:146 |
signal | AbortSignal | Aborted when a cancel strategy replaces this call or the provider or component unmounts. | types.ts:139 |