Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
React.Children.map(children, (child, index) => but got child.type.name is undefined on IE browser #9803
as title, i want to get child element's tag name,
Hey @SimonCheung1989 It's possible that this is failing because
So, taking this example:
Sounds like that's the problem. If you control the components that are being rendered as children you can get around this by using a static property like
Summary.displayName = "Summary"
Then you can check for
Since this is just an aspect of the environment that React can't really control, I'm going to close this out, but hopefully, that workaround helps!