Skip to content

Issue with island and props.children.find #2178

Closed Answered by adamzerner
adamzerner asked this question in Q&A
Discussion options

You must be logged in to vote

Ok, figured it out. As I said in the edit to the question, the issue is that stuff gets obfuscated in production, so instead of props.children[0].type.name being "AlertHeader", it's just "A".

To fix it, I did child.type.name === AlertHeader.name instead of child.type.name === "AlertHeader".

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@marvinhagemeister
Comment options

Answer selected by adamzerner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants