← BYTES
React.js·Intermediate·Ref: 4.2.13

What does `useReducer` provide that plain `useState` doesn't, at a basic level?

Have a question about this video? Mention reference 4.2.13 when you contact us.

a.It removes the need to ever re-render the component
b.A way to centralize more complex state-update logic into a single reducer function that handles different "action" types, similar in spirit to Redux
c.It can only be used for numeric state values
d.It replaces useEffect entirely
`useReducer` is useful once state transitions get complicated enough (multiple related values, several distinct kinds of updates) that spelling them all out as separate `useState` setters becomes unwieldy -- instead you dispatch a plain action object to a single reducer function that decides how state should change.

Find this on YouTube & Instagram

Every BYTES video is tagged with its reference number and topic — search any of these on YouTube or Instagram to find this one:

#BYTES#BYTES4213#Reactjs