React Forget - The new React compiler

React developers are likely aware that a common obstacle in improving application performance is unnecessary re-rendering of components when props or state changes.

React Forget - The new React compiler

React developers are likely aware that a common obstacle in improving application performance is unnecessary re-rendering of components when props or state changes.

Well there is a solution to that - Memoization. Yes useMemo and useCallback are there to help.

Well then what's the problem ? Problem is that every time a developer is writing the code he has to make sure that if there is a need to memoize some parts of the code and it sometimes becomes very tricky to analyze and understand what parts of code are causing unnecessary re-renders . Also these hooks add some extra complexity in the code and code looks cluttered and readability of the code is reduced.

"React Forget" tells you to forget about memoization. 😄 It will take care that for you out of the box.

With react-19, where the "React Forget" is aimed to be shipped, you will not need to use useMemo or useCallback any more. Compiler will automatically memoize all those parts of your code for you where it thinks memoization is needed. And according to react team it will do it more efficiently than you can think of.

Watch this video where React team demoed and explained how "React Forget" will handle the memoization on its own.

Liked it ?

Read more