-
Notifications
You must be signed in to change notification settings - Fork 50.1k
Closed
Labels
Status: UnconfirmedA potential issue that we haven't yet confirmed as a bugA potential issue that we haven't yet confirmed as a bugType: Bug
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-hooks (build issue installing or using the eslint plugin)
- react-compiler-healthcheck (build issue installing or using the healthcheck script)
Link to repro
https://playground.react.dev/#N4lgzg9grgTgxgUxALhAejQAgLIILYQCWAXggCaYBGAnpgEolCGc
Repro steps
- Open the React Compiler Playground link: https://playground.react.dev/#N4lgzg9grgTgxgUxALhAejQAgLIILYQCWAXggCaYBGAnpgEolCGc
- Observe the code that has a
constdeclaration between React hooks - Check the compiled output - you'll see that memoization is not working correctly
- The compiler should memoize values even when const is between hooks, but it currently doesn't
How often does this bug happen?
Every time
What version of React are you using?
Latest (React 19 or main branch)
What version of React Compiler are you using?
Latest babel-plugin-react-compiler from main branch
Metadata
Metadata
Assignees
Labels
Status: UnconfirmedA potential issue that we haven't yet confirmed as a bugA potential issue that we haven't yet confirmed as a bugType: Bug