What is React Forget/React Compiler?

Sammy-Jo Wymer
REWRITE TECH by diconium
5 min readDec 1, 2023

--

The concept of React Forget was introduced during React Conf. 2021 and has recently been renamed to React Compiler.

React Compiler is an ‘auto-memoizing compiler’ that automates all memoizations in your application.

Photo by Hilmi Işılak: https://www.pexels.com/photo/colorful-notebooks-on-the-table-13407343/

What is memoization?

In web development, memoization is the process of storing data (e.g. a variable value) in the cache and then retrieving this information next time it is needed (e.g. on a page or component re-render).

The cache is a temporary data store that holds data so that future requests for that data can be done faster.

Without memoization, this information would need to be recomputed each time a component or page re-renders, instead of simply being retrieved from the cache. This requires more computational power and will negatively impact your app’s performance. 😟

Thus, the purpose of memoization is to optimise your apps by improving efficiency and subsequent performance. 😄

How is memoization currently handled in React?

--

--