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)
Resources that settled it for me: (in order of discovery)
^ covers 99.9% of all use cases for me, including edge cases every time.
I learned that callback refs are best for measuring DOM nodes that change.
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.
Yeah! The linter is crazy helpful!
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.
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 👋
Hi!
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).
I'm working on the resources bit on my blog 😄
Did I said "thanks in advance"? I'll say it again anyway.😉Looking forward.