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

JSX element is not transformed to React.createElement when inside a spread #54984

Closed
EgoziE opened this issue Jul 12, 2023 · 2 comments Β· Fixed by #55008
Closed

JSX element is not transformed to React.createElement when inside a spread #54984

EgoziE opened this issue Jul 12, 2023 · 2 comments Β· Fixed by #55008
Assignees
Labels
Bug A bug in TypeScript

Comments

@EgoziE
Copy link

EgoziE commented Jul 12, 2023

Bug Report

πŸ”Ž Search Terms

JSX, spread, React.createElement

πŸ•— Version & Regression Information

5.1

⏯ Playground Link

Playground link with relevant code

πŸ’» Code

<Comp right={<div>x</div>} {...{ wrong: <div>x</div>}}/>

πŸ™ Actual behavior

React.createElement(Comp, { right: React.createElement("div", null, "x"), wrong: <div>x</div> });

πŸ™‚ Expected behavior

Works with version 5.0.4

React.createElement(Comp, Object.assign({ right: React.createElement("div", null, "x") }, { wrong: React.createElement("div", null, "x") }));
@fatcerberus
Copy link

Probably a duplicate of #54411 (see last comment)

@marsiancba
Copy link

Just hit this bug when upgrading to 5.1.
Also in 5.2.0 beta

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants