DEV Community

Discussion on: Fast track your React learning with these 12 Tips!

Collapse
 
pengeszikra profile image
Peter Vivo

13) useReducer - I think much more useful than useState.

Collapse
 
gcgbarbosa profile image
George C. G. Barbosa

Why?

Collapse
 
pengeszikra profile image
Peter Vivo

Because you can create much more complex state with single hooks with actions and reducer.

Thread Thread
 
gcgbarbosa profile image
George C. G. Barbosa

Thanks!

Collapse
 
stereoplegic profile image
Mike Bybee

useReducer is lower level than useState (the latter is built on the former), but you can (and often should) use useState (try saying than three times fast!) with a useReducer-like syntax.