Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
When and why useState is more benefic than useReducer? #587
Congratulations on the new design of your website kentcdodds.com.
Looking at the source code of your website, in the Subscribe component , you used useState hooks to handle the state of this component.
My question is, is not it more optimized to use a useReducer here instead of several useState? If not, why?
I asked myself this question by referring to your Egghead lesson here
Thanks for the question @tolotrasmile! I made it today's newsletter!
@kentcdodds other than the "aesthetic" reasons in the linked posts,