DEV Community

ch
ch

Posted on

How ReactJS creates inside functions? amazing !

In the past, I did not care how ReactJS creates functions and variables while re-rendering components.
But I had a few chance to look at about this.

Now ReactJS creates all functions and variables newly whenever they re-render their component.
To optimize performance with memory, useCallback was very effective for this, and decreased re-creation times a lot more.
Please check my repository, and github pages to test.

https://github.com/yeahCH/react-performance-inspector
https://yeahch.github.io/react-performance-inspector/

Top comments (0)