Async Await Issues
Not sure what is going on here, I think I'm just using async await incorrectly.
I am unable to get the resource to load unless I
console.log
the value beforehand.
I tried diabling SSR and it left me with response.json() is not a function
fetchSummoner2 function:
Any help or alternatiave approaches would be greatly appreciated. Thanks!4 Replies
what does
IconNumberBox
look like? does it actually use the prop profileIconId
?
https://start.solidjs.com/api/createRouteData could help with the detailsIconNumberBox
uses that prop to get the image id:
I checked out that link and I was able to use their example endpoint totally fine. I think it's because I'm trying to use a server$
function inside that's getting it messed up. I also tried calling createServerData$
inside the function which was no good (returned undefined):
I also tried just calling it bypassing the server$
call:
And this also only works if I access the values twice. I can console log it or add another element that accesses the data to grab it. Digging deeper into this only got me more lost.kobalte probably does not support ssr, so the resource needs to be accessed once outside of kobalte component.
That sounds right, just checked their docs and I didn't add this:
Usage with SolidStart
If you are using SolidStart you will need to add the ssr setting to your vite.config.ts:
from: https://kobalte.dev/docs/core/overview/ssr
I'm going to mark as resolved