SolidJSS
SolidJSโ€ข3y agoโ€ข
4 replies
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.
Was this page helpful?