1. 11
  1.  

  2. 3

    for me the most underrated section is the “When to use these hooks”. A lot of articles just write “use them, it makes things faster”. But using these hooks for very small and not much reused components without computation most of the times adds more complexity than needed and needs more resources than it tries to avoid.

    So always consider this quote from the article:

    The best way to use these hooks is in response to a problem. If you notice your app becoming a bit sluggish, you can use the React Profiler to hunt down slow renders.

    1. 2

      I haven’t read through all of the post yet but it looks exactly like the tutorial I’ve thought about writing countless times while helping some colleagues with React! It clearly demonstrates lots of pitfalls I’ve seen people fall into with re-renders and even has some nice visualizations. I’ll definitely share this with my colleagues.

      1. 2

        I have to admit that I am myself one of those updating apps to avoid the re-renders.