react/compiler
lauren c60eebffea
[compiler] Add new ValidateNoVoidUseMemo pass (#33990)
Adds a new validation pass to validate against `useMemo`s that don't
return anything. This usually indicates some kind of "useEffect"-like
code that has side effects that need to be memoized to prevent
overfiring, and is an anti-pattern.

A follow up validation could also look at the return value of `useMemo`s
to see if they are being used.

---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/facebook/react/pull/33990).
* #34022
* #34002
* #34001
* __->__ #33990
* #33989
2025-07-28 12:46:42 -04:00
..
apps/playground [compiler] Use diagnostic for "found suppression" error (#33981) 2025-07-24 15:54:24 -07:00
docs Update DEVELOPMENT_GUIDE.md (#32281) 2025-03-13 11:45:26 -04:00
fixtures [cleanup] Remove compiler runtime-compat fixture library (#31430) 2024-11-05 14:14:39 -05:00
packages [compiler] Add new ValidateNoVoidUseMemo pass (#33990) 2025-07-28 12:46:42 -04:00
scripts Remove leftover Rust script (#33314) 2025-05-20 12:20:51 -04:00
.eslintrc.js
.gitignore Remove leftover Rust script (#33314) 2025-05-20 12:20:51 -04:00
CHANGELOG.md [compiler] Update changelog for 19.1.0-rc.2 (#33207) 2025-05-15 10:34:11 -04:00
package.json [compiler] Update rimraf (#32868) 2025-04-14 15:15:14 -04:00
README.md
yarn.lock [mcp] Fix package.json (#33101) 2025-05-02 13:56:01 -04:00

React Compiler

React Compiler is a compiler that optimizes React applications, ensuring that only the minimal parts of components and hooks will re-render when state changes. The compiler also validates that components and hooks follow the Rules of React.

More information about the design and architecture of the compiler are covered in the Design Goals.

More information about developing the compiler itself is covered in the Development Guide.