Skip to content

docs: add React.Fragment info #98

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

Merged
merged 2 commits into from
May 30, 2018

Conversation

NickyMeuleman
Copy link
Contributor

@NickyMeuleman NickyMeuleman commented May 30, 2018

What: Add info to readme about React.Fragment and its interaction with container.firstChild

Why: This is a gotcha many people might run into.

Checklist:

  • Documentation
  • Tests N/A
  • Ready to be merged
  • Added myself to contributors table

When rendering a component that has a React.Fragment as the root element.
container.firstChild will only grab the first child of the fragment, NOT the fragment JSX-tag

NickyMeuleman and others added 2 commits May 30, 2018 16:52
When rendering a component that has a `React.Fragment` as the root element.
`container.firstChild` will only grab the first child of the fragment, NOT the fragment JSX-tag
Copy link
Member

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

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

Thanks!

@kentcdodds kentcdodds merged commit 671fac2 into testing-library:master May 30, 2018
@kentcdodds
Copy link
Member

🎉 This PR is included in version 3.1.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

@NickyMeuleman NickyMeuleman deleted the patch-1 branch September 26, 2018 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants