-
Notifications
You must be signed in to change notification settings - Fork 34
Closed
Description
I ran into the following problem where not all nested children would be visited:
This works
const A = ({ children }) => children
const B = ({ children }) => <div>{children}</div>
const tree = (
<A>
<B />
<B />
</A>
)
reactTreeWalker(tree, visitor, context)
So does this
const A = ({ children }) => <div>{children}</div>
const B = ({ children }) => children
const tree = (
<A>
<B />
<B />
</A>
)
reactTreeWalker(tree, visitor, context)
This does not work
Because there are no basic HTML elements wrapping the children of A, those individual children are not visited
const A = ({ children }) => children
const B = ({ children }) => children
const tree = (
<A>
<B />
<B />
</A>
)
reactTreeWalker(tree, visitor, context)
A PR will follow shortly and should provide a fix for this issue.
Metadata
Metadata
Assignees
Labels
No labels