DEV Community

Cover image for Why React Hooks?

Why React Hooks?

Tyler McGinnis on July 30, 2019

This was originally published at ui.dev and is part of our React Hooks course. If you enjoy this post, check it out. The first thing you sh...
Collapse
 
sebastienbarre profile image
Sebastien Barre

Please, for the love of the Flying Spaghetti Monster, no face clickbait on video thumbnails, you're killing me Smalls :)

Collapse
 
kayis profile image
K

Haha, a YouTuber got to eat.

Collapse
 
yamitrvg12 profile image
yamit villamil

Thank you so much. This is the kind of articles that i like to read, knows the why and how is the main idea to finally understand why this thinks are designed.

Collapse
 
tylermcginnis profile image
Tyler McGinnis

Thank you!

Collapse
 
ulitroyo profile image
Uli Troyo

Two things:

  1. Don't listen to Sebastien Barre! I like you face. (I know he's half-joking though.)

  2. I already am subscribed to you on YouTube; I think this is a pretty neat use of this platform! Following a tutorial is easier in text, and I appreciate the write-up :)

Collapse
 
tylermcginnis profile image
Tyler McGinnis

Thanks for the support! I like my face too 😂

Collapse
 
thepeoplesbourgeois profile image
Josh • Edited

I adore hooks, but do kinda wish more people were glomming onto the handleEvent bandwagon with all the cool artsy lonely developers who are technically correct and writing h*ckin' fast JavaScript, but who are not popularly correct — the best kind of correct.

Also, I like the facebait.

Collapse
 
wesgrimes profile image
Wes

This is fantastic Tyler! Thank you for taking the time to dive into the history behind it all.

Collapse
 
tylermcginnis profile image
Tyler McGinnis

Glad you enjoyed it!

Collapse
 
billelmidouni profile image
Midouni Billel

Thanks for this explanation :)

Collapse
 
tylermcginnis profile image
Tyler McGinnis

You're welcome!

Collapse
 
chriswcs profile image
Christian Hansen

Very nice explanation of the motivation for why to use them. They are definitely more than just a shiny new addition to the library.

Collapse
 
tylermcginnis profile image
Tyler McGinnis

Definitely. I think the closing paragraph sums it up nicely - "The marketing pitch for Hooks is that you’re able to use state inside function components. In reality, Hooks are much more than that. They’re about improved code reuse, composition, and better defaults."

Collapse
 
seanmclem profile image
Seanmclem

Pretty much everything I read for weeks before getting started were all about the why, and benefits.