Member-only story

React is about to release Compiler, it’s time to say goodbye to useMemo/useCallback!

Beck Moulton
4 min readAug 19, 2024

--

Recently, the React team published an article on their official blog, introducing some of the team’s work from the last major version release to February 2024.

What surprised me the most was the React Compiler.

As we all know, when introducing React, people always say that it is a re-runtime framework, because it itself does not do a lot of optimization actions for rendering when compiling.

This gives developers a lot of flexibility during the development phase. Reactprovides us with APIs such as useMemo/useCallback, which puts the means of runtime optimization in the hands of developers. But this also brings great mental burden to developers.

Although using Reactwell can make your application have extreme performance, in fact, using Reactwell is far more difficult than we think.

In contrast, Vue.jssuch frameworks are different, everyone says that Vueis easier to get started with than React, more suitable for beginners, mainly because it does not have so many twists and turns, many optimization matters can be done when compiling.

This time Reactlaunched Compilermay break everyone's conventional cognition.

The official React blog describes it as follows:

When the state changes, Reactcan sometimes over-render. Since the advent of React, our solution to such situations has been manual caching…

--

--

Beck Moulton
Beck Moulton

Written by Beck Moulton

Focus on the back-end field, do actual combat technology sharing Buy me a Coffee if You Appreciate My Hard Work https://www.buymeacoffee.com/BeckMoulton

No responses yet