bigmistqke 🌈
bigmistqke 🌈
SSolidJS
Created by Liquido on 7/6/2024 in #support
How to store JSX element in a signal and render it from other elements
Code looks good to me. I can not seem to reproduce the computations-error.
6 replies
SSolidJS
Created by binajmen on 7/4/2024 in #support
Is there a way to access children props?
TIL about compareDocumentPosition and Node.DOCUMENT_POSITION_PRECEDING and the like. Node.DOCUMENT_POSITION_PRECEDING is like a global of the current comparison? strange api!
45 replies
SSolidJS
Created by binajmen on 7/4/2024 in #support
Is there a way to access children props?
Or swapping order of elements with <For/>
45 replies
SSolidJS
Created by binajmen on 7/4/2024 in #support
Is there a way to access children props?
Otherwise I usually create a context on the parent (the Editor in this case) and provide a map to which each child can add itself (its ref) onMount and remove itself onCleanup.
Doesn't this fail when there is conditional rendering and you count on order of the children?
45 replies
SSolidJS
Created by binajmen on 7/4/2024 in #support
Is there a way to access children props?
45 replies
SSolidJS
Created by binajmen on 7/4/2024 in #support
Is there a way to access children props?
exactly, a div is a div 🙂
45 replies
SSolidJS
Created by binajmen on 7/4/2024 in #support
Is there a way to access children props?
u can really do whatever
45 replies
SSolidJS
Created by binajmen on 7/4/2024 in #support
Is there a way to access children props?
solid's jsx is so flexible
45 replies
SSolidJS
Created by binajmen on 7/4/2024 in #support
Is there a way to access children props?
i love these kind of sneaky stuff 😁
45 replies
SSolidJS
Created by binajmen on 7/4/2024 in #support
Is there a way to access children props?
you are very welcome!
45 replies
SSolidJS
Created by binajmen on 7/4/2024 in #support
Is there a way to access children props?
what do you mean?
45 replies
SSolidJS
Created by binajmen on 7/4/2024 in #support
Is there a way to access children props?
but the WeakMap is maybe less hacky at the end of the day
45 replies
SSolidJS
Created by binajmen on 7/4/2024 in #support
Is there a way to access children props?
that is how <Route/> works in solid-router
45 replies
SSolidJS
Created by binajmen on 7/4/2024 in #support
Is there a way to access children props?
u could also return non-dom elements
45 replies
SSolidJS
Created by binajmen on 7/4/2024 in #support
Is there a way to access children props?
but then it would be undefined when getting it from the WeakMap
45 replies
SSolidJS
Created by binajmen on 7/4/2024 in #support
Is there a way to access children props?
it would be more readable with a ref
45 replies
SSolidJS
Created by binajmen on 7/4/2024 in #support
Is there a way to access children props?
ye it's a bit sneaky 🙂
45 replies
SSolidJS
Created by binajmen on 7/4/2024 in #support
Is there a way to access children props?
45 replies
SSolidJS
Created by Mtlive on 6/28/2024 in #support
how using createRoot?
With SSR you should do dependency injection with context to not create accidental shared state between different visitors.
8 replies
SSolidJS
Created by Mtlive on 6/28/2024 in #support
how using createRoot?
Also important to note: if you are using SSR this pattern (it's called a singleton i think: having a reactive value that you import wherever you need it) will cause issues.
8 replies