DEV Community

Kent C. Dodds
Kent C. Dodds

Posted on

Read the React Hooks docs (again)

I was reading the React Hooks docs again yesterday and noticed that they've improved since the last time I reviewed them. I get a lot of questions from people about React Hooks, (and understandably so, there's a bit of a learning curve) and so many of the questions are answered in the React Hooks documentation (especially the FAQ) or by searching "hook" on my blog.

So if it's been a while, give the docs another look. You'll definitely learn something new! Then come back here and comment on what it was you learned πŸ˜‰ let's learn together.

Top comments (10)

Collapse
 
kapral18 profile image
Karen Grigoryan • Edited

Resources that settled it for me: (in order of discovery)

  1. reactjs.org/docs/hooks-faq.html (covers most edge cases and recommendations)
  2. overreacted.io/a-complete-guide-to... (covers philosophy behind hooks, and a lot of tasty tips, had to reread like 5 times until it "clicked" )
  3. github.com/facebook/react/blob/mas... (for everything else, thanks to the react team it's incredibly readable)

^ covers 99.9% of all use cases for me, including edge cases every time.

Collapse
 
kentcdodds profile image
Kent C. Dodds
Collapse
 
chiangs profile image
Stephen Chiang

I definitely had to reread them. Critical to helping me refactor and work out the hooks linting issues that came up when I upgraded to Scripts 3.0...I thought I understood hooks pretty well... Not as well as I thought and not as well as I do now.

Collapse
 
kentcdodds profile image
Kent C. Dodds

Yeah! The linter is crazy helpful!

Collapse
 
liana profile image
Liana Felt (she/her)

So if it's been a while, give the docs another look. You'll definitely learn something new!

You're right!

When hooks first came out, it was this mysterious new thing everyone was trying to explain in different ways. Things have become more coherent since then.

Collapse
 
jkup profile image
Jon Kuperman

Yep!

My team had a meeting about hooks the other day and I re-read the docs beforehand. It was well worth it!

Also, hi Kent πŸ‘‹

Collapse
 
kentcdodds profile image
Kent C. Dodds

Hi!

Collapse
 
voidjuneau profile image
Juneau Lim

I'm observer mode on this topic.
Heard, never tried, wondering about. probably wait for it to get become more popular(=> more resource) and stable(=> less possible trouble).

Collapse
 
kentcdodds profile image
Kent C. Dodds

I'm working on the resources bit on my blog πŸ˜„

Collapse
 
voidjuneau profile image
Juneau Lim • Edited

Did I said "thanks in advance"? I'll say it again anyway.πŸ˜‰Looking forward.