React Compiler

React compiler notes


Starting from scratch

What is it?

  • It is a build-time only tool
  • Only works with plain JS and understands the rules of React
  • Has an eslint plugin to surfaces analysis directly in the editor (runs independently of the compiler)

What does it do?

It understands the code at deep level through its understandings or plain JS and rules of React. Thios allows it to add automatizations to the code, such as memoization of components without explicitley setting it, as long as the code does not break the rules (following the rules of react)

Key Takeaways

  • Not included in React 19
  • Follow React rules
  • Not ready for prod yet

Links

fb.me/react-compiler Video in-depth