S
SolidJS2y ago
Grahf

Load component after createServerData$ fetches data and it is rendered

Once upon a time, using solidJS, I used .state from createResource to check when the .state was equal to "ready". I used <Show> to render a component when the .state was "ready". Basically trying to do the same thing in SolidStart but I'm using createServerData$ to get the data. Just want to load a component after the data is loaded and NOT before. Once it gets the data I'd like to show a component. I know createRouteData has a state property. But I'm not using that since m y createServerData$ function takes a prop as a value and as far as I know createRouteData can't use a prop value since it has to be exported, hence appear at the top level and wouldn't have access to props.
2 Replies
Grahf
Grahf2y ago
well shizzel it looks like createServerData$ also has .state which is wonderful just didn't see it in the docs(and I know those aren't complete). my bads
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server
More Posts