Waqas Tahir
Waqas Tahir
SSolidJS
Created by Waqas Tahir on 10/27/2023 in #support
How to defer rendering a component on server side in solidjs
While Suspense delivers a fallback and the code is run on the browser My only requirement is that all code is run on the server until the resource is ready then I deliver THE JSX
3 replies
SSolidJS
Created by Waqas Tahir on 10/27/2023 in #support
Undocumented Hook useAssets ?
It works in solidjs as it is, I was able to dedupe and put style element into head use useAssets hook , how ever not in astro
36 replies
SSolidJS
Created by Waqas Tahir on 10/27/2023 in #support
Undocumented Hook useAssets ?
apparently
36 replies
SSolidJS
Created by Waqas Tahir on 10/27/2023 in #support
Undocumented Hook useAssets ?
I can't make it work with Astro
36 replies
SSolidJS
Created by Waqas Tahir on 10/27/2023 in #support
Undocumented Hook useAssets ?
I am going to setup an astro example and try to make it work
36 replies
SSolidJS
Created by Waqas Tahir on 10/27/2023 in #support
Undocumented Hook useAssets ?
36 replies
SSolidJS
Created by Waqas Tahir on 10/27/2023 in #support
Undocumented Hook useAssets ?
createRenderEffect(() => { console.log("the render efffect is here") useAssets(() => { console.log("the use assets hook is here") return <style id={elemId} nonce={context.cache?.nonce}>{.${className}{${rulesString}}}</style> }) })
36 replies
SSolidJS
Created by Waqas Tahir on 10/27/2023 in #support
Undocumented Hook useAssets ?
btw useAssets hook doesn't run in the browser, but createRenderEffect does, I just console logged in it
36 replies
SSolidJS
Created by Waqas Tahir on 10/27/2023 in #support
Undocumented Hook useAssets ?
I am going to create a solid-start module and test it in that and if it works I'll post here, right now I am using Astro and it doesn't seem to work
36 replies
SSolidJS
Created by Waqas Tahir on 10/27/2023 in #support
Undocumented Hook useAssets ?
createRenderEffect runs in the browser, I just tested it, I inserted a console log, shows up in the browser console
36 replies
SSolidJS
Created by Waqas Tahir on 10/27/2023 in #support
Undocumented Hook useAssets ?
I tried to do it in the createRenderEffect & also without it, both ways it doesn't work
36 replies
SSolidJS
Created by Waqas Tahir on 10/27/2023 in #support
Undocumented Hook useAssets ?
how to fix thsi
36 replies
SSolidJS
Created by Waqas Tahir on 10/27/2023 in #support
Undocumented Hook useAssets ?
Okay, currently this code doesn't work
36 replies
SSolidJS
Created by Waqas Tahir on 10/27/2023 in #support
Undocumented Hook useAssets ?
I have given a unique key based on contents
36 replies
SSolidJS
Created by Waqas Tahir on 10/27/2023 in #support
Undocumented Hook useAssets ?
Ok, I all try that, Can you also tell me how to avoid duplicate style elements
36 replies
SSolidJS
Created by Waqas Tahir on 10/27/2023 in #support
Undocumented Hook useAssets ?
style elment to head, no duplicate key
36 replies
SSolidJS
Created by Waqas Tahir on 10/27/2023 in #support
Undocumented Hook useAssets ?
ok, What in your opnion is the best way to do this ? I just need to insert a style element which is given a unique key Into the head element during SSR, I also don't want any duplicate keys
36 replies
SSolidJS
Created by Waqas Tahir on 10/27/2023 in #support
Undocumented Hook useAssets ?
In SUID its written like this https://github.com/swordev/suid/blob/main/packages/styled-engine/src/createStyle.tsx#L81 I am trying to do something like that, That works though
36 replies
SSolidJS
Created by Waqas Tahir on 10/27/2023 in #support
Undocumented Hook useAssets ?
I am using if(isServer)
36 replies
SSolidJS
Created by Waqas Tahir on 10/27/2023 in #support
Undocumented Hook useAssets ?
yes I am using ssr
36 replies