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

Should look for nodes with alternate component version when looking for chidren #146

Open
mvoica opened this issue Aug 7, 2019 · 1 comment

Comments

@mvoica
Copy link

mvoica commented Aug 7, 2019

const renderedChildren = getRenderedChildren(reactComponent);

could this line be something like

var renderedChildren = getRenderedChildren(getRenderedComponentVersion(reactComponent, getRootElsReact16()));

?

or well, could the children be looked at in the context of the component.alternate (?)

The getRenderedComponentVersion is already called when we look for the component corresponding to a certain dom node (which is where the search for children starts):

return getRenderedComponentVersion(reactInstance, rootInstances);

but we never look at the component.alternate during the search for nested children

Came across this when trying to access the children of a component that is wrapped by the [email protected] translate(Component) wrapper, when doing some .findReact(A).findReact(B).findReact(C). In which case, one of the intermediate components has no child, but its alternate does have the child with which the search should continue.

@Dmitry-Ostashev
Copy link
Collaborator

Currently your scenario looks unclear to us. Could you please provide a sample project with a test that can help us reproduce this behavior?

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

No branches or pull requests

2 participants