S
SolidJS2mo ago
James

solid-motionone/@solid-primitives/transition-group - onMount/createEffects called before add to DOM

I have a <Presence exitBeforeEnter> which is using a keyed <Show> to toggle between two components with a transition in between - however the component that comes in to replace the original component is mounted in a solid.js sense before the elements are actuallty on the page - can I check for when the elements are in DOM? A hook of some kind maybe? Cheers!
1 Reply
mrVinicius
mrVinicius2mo ago
perhaps u could use a ref signal and check if its no longer undefined, meaning it has rendered on the dom. https://docs.solidjs.com/concepts/refs
Want results from more Discord servers?
Add your server