← Code LabReact Native0/50 solved · 0%
State management · medium

21. useReducer for a send form

Model send-form state transitions.

Write `formReducer(state, action)` handling `{ type: "setAmount", amount }` and `{ type: "setRecipient", recipient }`, updating just that field and preserving others.
Required in your answer: switch (action.type)...