Function · Hooks and State
useReducer
Stores component-local state updated by a reducer.
@sharpts/gui 0.0.0-local · SharpTS 7c6010104a43Signature
TypeScript
useReducer(reducer: (state: S, action: A) => S, initial: S): [S, Dispatch<A>]Parameters
| Name | Type | Description |
|---|---|---|
reducer | (state: S, action: A) => S | Produces the next state from the current state and an action. |
initial | S | Initial reducer state. |
Returns
[S, Dispatch<A>] — The current state and an action dispatcher.
Related symbols
Source
SharpTS.Gui.Sdk/GuiPackage/runtime.ts:203 at SharpTS revision 7c6010104a43c34d80e9d44704cf179bc4f5b8e0.