vendredi 30 août 2019

How to mount a component withTheme inside another component withTheme?

I'm trying to build a component wrapped by a ThemeProvider which has a child component that is wrapped by the same ThemeProvider in ReactJS.

So, here is the problem. My first component is A and the second one is B. In that case, both of them are returned wrapped by the same ThemeProvider, so I use withTheme(A) and withTheme(B) inside of both.

When I try to debug() those components inside the unit test, I got the content of the component A but I can't get the content of the B component. Why? And how can I do that?

Aucun commentaire:

Enregistrer un commentaire