SolidJSS
SolidJSโ€ข3y agoโ€ข
2 replies
marcusbuffett

Checking if children exists breaks refs

This has been driving me insane, but I just figured out that if you do something like this : https://playground.solidjs.com/anonymous/67fefe74-34a1-48a0-8d2c-b05d3ceb7abd , 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?
Quickly discover what the solid compiler will generate from your JSX template
Was this page helpful?