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 correctly identify components returned from factory #31262

Open
2 of 4 tasks
imjordanxd opened this issue Oct 15, 2024 · 0 comments
Open
2 of 4 tasks
Labels
Component: Optimizing Compiler Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug Type: Bug

Comments

@imjordanxd
Copy link

imjordanxd commented Oct 15, 2024

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/#N4Igzg9grgTgxgUxALhASwLYAcIwC4AEAVAQIZgEBKCpchAZjBBgQOQw12sDcAOgHYCEADxz4CAEwT1SUADYMo-Omgj8CAWQCeAQSxYAFAEoCwAQQIc8sdQB4JaAG4A+ABII5ciAQDquORK2APQOLnz8AL4CAvRKKmoEAGIQEMam5gRwamCEANr8pBgIADQEYAh4AHKFCAC6BAC8VJx4AHRQ5QDKeKR4CAasrEbhFlY2BLYAFgCMbh5epgVFEcEzzgJRgvyxyniq6nAcvQjJqSZm6pYV4zvx6qdpFxYWWfw5BPk1peVVNfVN1FobQ6CG6xwGQxGzzGMDsa3cnm8wCWCBWQTWGU2mxAESAA

even without state, the output is questionable: https://playground.react.dev/#N4Igzg9grgTgxgUxALhASwLYAcIwC4AEAVAQIZgEBKCpchAZjBBgQOQw12sDcAOgHYCEADxz4CAEwT1SUADYMo-Omgj8CAWQCeAQSxYAFAEoCwAQQIc8sdQB4JaAG4A+ABII5ciAQDquORK2APQOLnz8AL4CAvRKKmoEAGIQEMam5gRwamCEANr8pBgIADQEYAh4AHKFCAC6BAC8VJx4AHRQ5QDKeKR4CAasrEbhFlY2BLYAFgCMbh5epgVFEcEzzgJRgvyxyniq6nAcvQjJqSZm6pYV4zvx6qdpFxYWQUGZ2XlLJWUV1UX1TWotDaHQQ3WOAyGI2eYxgdjW7k8EFKAHd-IEgmsMptNiAIkA

Repro steps

Simply create a function that returns a React function component. This is completely valid code.

How often does this bug happen?

Every time

What version of React are you using?

19

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

No branches or pull requests

1 participant