DEV Community


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

przemwo profile image
Przemek Wolnik Author

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.

Thread Thread
wanzulfikri profile image

I see.

Thank you for the answer.

Forem Open with the Forem app