DEV Community

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

Collapse
 
przemwo profile image
Przemek Wolnik

If states variables are connected to each other (like in my example with form fields above) I would go with useReducer instead of useState.

Otherwise I think useState is a better option.