Skip to content

Handle nested Fragments with multiple children for ReactTestRenderer #12109

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
wants to merge 1 commit into from

Conversation

ambar
Copy link

@ambar ambar commented Jan 28, 2018

Fixes #12106

Copy link

@vikram06 vikram06 left a comment

Choose a reason for hiding this comment

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

Approved

@gaearon
Copy link
Collaborator

gaearon commented Feb 5, 2018

Fragment is not really a component, is it?

I think we'll need input from @lelandrichardson and @ljharb since toTree() API was initially added for Enzyme.

@gaearon
Copy link
Collaborator

gaearon commented Feb 5, 2018

Hmm, I forgot Enzyme doesn't use toTree 😥 We're in this awkward spot where we added it for tools like this but it's not clear who's actually using it so this method is always behind, and there is no clear owner for the tree format.

@gaearon
Copy link
Collaborator

gaearon commented Feb 5, 2018

I don't think this is the right fix. The right fix would be to ignore fragments and inline their content, like Enzyme does. I'll send a PR.

@gaearon gaearon closed this Feb 5, 2018
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants