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

Does not render static + dynamic children #475

Closed
jisaacks opened this issue Jun 27, 2016 · 2 comments · Fixed by #476
Closed

Does not render static + dynamic children #475

jisaacks opened this issue Jun 27, 2016 · 2 comments · Fixed by #476

Comments

@jisaacks
Copy link

I am doing full DOM rendering, when a component contains static OR dynamic children it works. However, when a component contains static AND dynamic children, it does not:

let compA = mount(<div>hello</div>);
console.log('A', compA.debug());

let compB = mount(<div>{'world'}</div>);
console.log('B', compB.debug());

let compC = mount(<div>hello {'world'}</div>);
console.log('C', compC.debug());

output:

A <div>
  hello
</div>
B <div>
  world
</div>
C <div />

Notice how C is being redered as <div />. Expected: <div>hello world</div>.

Not sure if it is relevant but I am using jsdom.

@nfcampos
Copy link
Collaborator

const w = mount(<div>hello {'world'}</div>)
console.log(w.debug()) // output: <div />
console.log(w.text()) // output: hello world

Looking into this a bit more I can tell you that while the children are being rendered, as the output of .text() shows, the .debug() method is failing to show the children in this case. I'll look into this more.

@nfcampos
Copy link
Collaborator

@jisaacks should be fixed by #476

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 a pull request may close this issue.

2 participants