Checking if children exists breaks refs

This has been driving me insane, but I just figured out that if you do something like this : , then the ref you end up with isn't actually in the dom, since the ref was assigned twice, once for the actual node in the dom, and once for the props.children && "some-class-name" thing. 1) Is this a bug? 2) Is there a general pattern I should use to avoid this?
Solid Playground
Quickly discover what the solid compiler will generate from your JSX template
2 Replies
marcusbuffett9mo ago
I really gotta read docs more facepalmz That being said, this was surprising and took me hours to figure out, would be great to have some sort of warning for this if possible
thetarnav9mo ago
Calling children in a memo would also help