Need help understanding preload and file conventions
Hello guys,
I started with SolidStart and want to fetch data before rendering the page, So I found
It "somehow" works, the
All of those 3 files might need different names, I don't know.
My questions are:
- How do I render a 404 page?
- Is it possible to render a pending page while preloading the data? How?
- How do I render an error page if the preload function throws?
- How do I access the fetched data inside my "success" page?
I wasn't able to find it in the docs and maybe I completely misunderstood the concepts here
But I know that https://tanstack.com/router handles things this way
I started with SolidStart and want to fetch data before rendering the page, So I found
preload here https://docs.solidjs.com/solid-start/building-your-application/routing#additional-route-config and started withIt "somehow" works, the
preload function was called. I also created 3 other components in the same directory => notFound.tsx, pending.tsx, error.tsx.All of those 3 files might need different names, I don't know.
My questions are:
- How do I render a 404 page?
- Is it possible to render a pending page while preloading the data? How?
- How do I render an error page if the preload function throws?
- How do I access the fetched data inside my "success" page?
I wasn't able to find it in the docs and maybe I completely misunderstood the concepts here
