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] Allow ReactElement symbol to be configured when inlining jsx #30996

Merged
merged 2 commits into from
Sep 19, 2024

Conversation

jackpope
Copy link
Contributor

Based on #30995 (rendered diff)


Some apps still use react.element symbols. Not only do we want to test there but we also want to be able to upgrade those sites to react.transitional.element without blocking on the compiler (we can change the symbol feature flag and compiler config at the same time).

The compiler runtime uses react.transitional.element, so the snap fixture will fail if we change the default here. However I confirmed that commenting out the fixture entrypoint and running snap with react.element will update the fixture symbols as expected.

Copy link

vercel bot commented Sep 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-compiler-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 19, 2024 2:20pm

*/
enableInlineJsxTransform: z.boolean().default(false),
inlineJsxTransform: ReactElementSymbolSchema.nullish(),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this format of a nullable string makes it harder or uglier to add more options in the future w/o breaking changes. You could consider a nullable object with a elementSymbol key.

If it's only for internal experimentation, it doesn't really matter that much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants