Skip navigation
React re-renders recursively, and when it comes across the element that preserves its referential…
0:00 / 0:26

React re-renders recursively, and when it comes across the element that preserves its referential…

Alex Sidorenko

@asidorenko_35K followers

Visit on X
1,428 likesDownloadOriginal post

325,271 views

React re-renders recursively, and when it comes across the element that preserves its referential identity from the previous render, it can stop the recursion. That's why component composition can be used as an alternative to memoization.

12 Comments

Comments from the original post on X (Twitter)

  • christina's profile picture

    @cszhu

    this animation is so slick! how did you. make it? beautiful :) looking forward to the article

    6 likes

  • Roman Dvornov's profile picture

    @rdvornov

    Nice visualization ❤️ Just curious, did you you tried React Render Tracker? It can be handy for a searching such kind of issues in a React app

    5 likes

  • Dhruv Suthar's profile picture

    @0xdhrv

    this made even more sense, after following "joy of react" by @JoshWComeau

    3 likes

  • Alex Sidorenko's profile picture

    @asidorenko_

    @JoshWComeau Josh has the most mind-blowing interactive articles. Huge inspiration.

    6 likes

  • bk's profile picture

    @boulatbek

    пожалуйста покажите как распознать случаи когда такой подход применим

    1 like

  • Alex Sidorenko's profile picture

    @asidorenko_

    @1258632 Writing an article about it, stay tuned

  • La Ode Muhammad Al Fatih's profile picture

    @lamualfa

    I've used React for 4 years and still don't know this. Thanks.

    1 like

  • Alamin's profile picture

    @iam_chonchol

    Well explained, love the visual explanation.

    1 like

  • tonix_3's profile picture

    @tonix_3

    This is pure gold

    1 like

  • Neeraj's profile picture

    @neeraj_artx

    Can't wait for the article!

    1 like

  • Arrow's profile picture

    @vincentnext_

    @memdotai mem it @readwise save thread @threadreaderapp unroll @SaveToNotion #thread

  • prepor's profile picture

    @prepor

    Check the definition of "recursive", pls, it's hard to understand what you are talking about