useReducer பல useState setters-ஐ சிதறடிக்க பதிலாக, ஒரு pure reducer function-இல் state மாறுதல்களை மையப்படுத்துகிறது. இது Redux pattern-இன் React-இன் உள்ளமைக்கப்பட்ட பதிப்பு.
jsx
() {
(action.) {
: { : state. + };
: { ...state, : action. };
: { : , : };
: state;
}
}
() {
[state, dispatch] = (reducer, { : , : });
;
}
