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!
2 replies
@solidjs/start @solidjs/meta not being SSR'd when resources used, bug or my misuse?
See: https://codesandbox.io/p/devbox/clever-leaf-r4xrg6?file=%2Fsrc%2Froutes%2Fabout.tsx
The <title> works fine on the About page, but if you view the HTML document the server provides, it is missing the <title> - it is only added by the client. Everything else renders fine!
Cheers!
4 replies
React key prop substitute!
I know what you're thinking, James, you silly sausage - Solid.js doesn't require keys for loops, and you're absolutely right but... I need key={} for another reason, I need to cause a component to be entirely unmounted and remounted, which was easily viable in React by just updating its key value in its parent. Any ideas how I can do that in Solid.js?
Cheers,
James
6 replies
Get SSR attribute value when hydrating
Hi guys! The server generates an attribute value for an element and I don't want to re-generate that attribute value on the browser side because it's unnecessary load on the user device. Is it possible to access the to-be-updated element from within the client side component function code?
e.g.
I do still need the doHeavyCalculationThing's code to be given to the client as it will need to re-calculate after an interaction.
cheers!
10 replies