-
Notifications
You must be signed in to change notification settings - Fork 49.6k
Closed
Labels
Component: React CompilerStatus: 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-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
In our repo we have code similar to the Playground link posted above which when compiled loses the assignment part of the increment expression.
The original code:
for (
let node: LexicalNode | null = selection.anchor.getNode();
node && !$isRootNode(node);
node = node.getParent()
) {
Compiled to this code:
for (let node5 = selection.anchor.getNode(); node5 && !$isRootNode2(node5); node5.getParent()) {
Happy to provide additional information or context if needed, thanks!
How often does this bug happen?
Every time
What version of React are you using?
19.0.0-rc-f3e09d6328-20240612
Metadata
Metadata
Assignees
Labels
Component: React CompilerStatus: UnconfirmedA potential issue that we haven't yet confirmed as a bugA potential issue that we haven't yet confirmed as a bugType: Bug