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

fix(react): support void children in experimentalReactChildren #8455

Merged
merged 2 commits into from
Sep 7, 2023

Conversation

natemoo-re
Copy link
Member

Changes

  • Fixes experimentalReactChildren breaks self-closing tags #8432
  • We were manually creating children with a { children: [] } prop, which broke void elements like hr and img.
  • Turns out that React creates props.children on the vnode automatically, so it's already there if we need to push children onto the stack.
  • Also cleaned up some key warnings by automatically generating a unique ID for each child.

Testing

Tested manually with the repro provided

Docs

N/A, bug fix only

@changeset-bot
Copy link

changeset-bot bot commented Sep 7, 2023

🦋 Changeset detected

Latest commit: fa7d1bc

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added pkg: react Related to React (scope) pkg: integration Related to any renderer integration (scope) labels Sep 7, 2023
@natemoo-re natemoo-re merged commit 85fe213 into main Sep 7, 2023
4 checks passed
@natemoo-re natemoo-re deleted the fix/react-children branch September 7, 2023 20:54
@astrobot-houston astrobot-houston mentioned this pull request Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: integration Related to any renderer integration (scope) pkg: react Related to React (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

experimentalReactChildren breaks self-closing tags
2 participants