DEV Community

Discussion on: How to use useReducer hook to mimic setState method?

Collapse
 
sunpietro profile image
Piotr Nalepa

When there is too many state variables in a component, then it might be a sign that a component can be splitted into smaller ones. But it depends on a use case.

Thread Thread
 
limal profile image
Łukasz Wolnik

I agree with you. It might be the case, so it's good to have options and make informed trade-offs.