Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Compiler Bug]: Does not check for ref access in setState initial value function #31418

Open
1 of 4 tasks
aeharding opened this issue Nov 5, 2024 · 0 comments
Open
1 of 4 tasks

Comments

@aeharding
Copy link

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

https://playground.react.dev/#N4Igzg9grgTgxgUxALhAMygOzgFwJYSYAEAKgmDgBQCURwAOsUXIRUTgIYBGASgmkQC8RKGAR80NRkRFiAypxwJKNIQD523CQDo4sGAkw5qAbkYBfEOaA

Repro steps

The playground compiles, but it should fail (Rules of React)

How often does this bug happen?

Every time

What version of React are you using?

latest playground

What version of React Compiler are you using?

latest playground

@aeharding aeharding added Component: Optimizing Compiler Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug Type: Bug labels Nov 5, 2024
@josephsavona josephsavona removed the Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug label Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants