#Checking if children exists breaks refs

2 messages · Page 1 of 1 (latest)

fleet tundra
#

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?