-
Notifications
You must be signed in to change notification settings - Fork 49.7k
Closed
Description
What kind of issue is this?
- React Compiler core (the JS output is incorrect, or your app works incorrectly after optimization)
- babel-plugin-react-compiler (build issue installing or using the Babel plugin)
- eslint-plugin-react-compiler (build issue installing or using the eslint plugin)
- react-compiler-healthcheck (build issue installing or using the healthcheck script)
Link to repro
Repro steps
To reproduce the issue, create a simple React component and add the "use no memo" directive at the top of the function, like this:
function Component() {
"use no memo";
const [count, setCount] = useState(0);
return <div>{count}</div>;
}Even though the directive is there, the component still gets compiled, which shouldn’t happen according to the documentation. I’ve also tried placing the directive at the top of the file, and the behavior doesn't change.
To confirm, I tested this in different components and even in a fresh project, but the components keep getting compiled regardless of the directive.
The same result appears in the React Compiler Playground, showing that the "use no memo" directive is being ignored.
How often does this bug happen?
Every time
What version of React are you using?
19
What version of React Compiler are you using?
19.0.0-beta-8a03594-20241020