Madaxen86
Server-side redirects are done client-side
Query may be called inside a createAsync.
With option deferStream true you can block any streaming to the client before the async resource has resolved.
https://docs.solidjs.com/solid-router/reference/data-apis/create-async#options
https://docs.solidjs.com/solid-start/building-your-application/data-loading
What would you expect to see in the network tab after a "true" server side redirect?
5 replies
why store not updated in createAsync?
As brenezl said: "never set state inside primivites (createEffect,createAsync,createSignal,createStore,...)". whenever you find yourself doing this: rethink your architecture. Usually the setter should be called in an event handler or check if you misunderstood how to use the docs.
createAsync is executed on the server, setting the stores state at the server, however the store get recreated on the client during hydration with it's initial state.
Just check your browser and cli (server) console logs. And there' aslo some race condition going on. when enabling break1 you'll get inital state, otherwise updated state.
6 replies
How do Layouts work with SolidStart?
File-routing is documented in the SolidStart part of the docs:
https://docs.solidjs.com/solid-start/building-your-application/routing#nested-layouts
9 replies
Async route guards in Solid Router, and serverside props (not using SolidStart)
There's a
useBeforeLeave
hook that allows to "hook" into the routing process:
https://docs.solidjs.com/solid-router/reference/primitives/use-before-leave#usebeforeleave8 replies
renderToString in Elysia BFF Layer
Maybe this could help
https://github.com/DaniGuardiola/bun-plugin-solid
47 replies
SolidTable infinite loop with `createAsync` query, createMemo but not createSignal + createEffect?
Oh and what I'd always recommend with Tanstack table is to seperate data fetching to a higher component because with the
createSolidTable
you are accessing the data accessor outside of the JSX so the Suspense
inside this component does not pick this up and you'll fallback to higher up Suspense
boundary.
7 replies
SolidTable infinite loop with `createAsync` query, createMemo but not createSignal + createEffect?
If you call the async accessor inside the createEffect the Suspense boundary in a higher up component will be triggered. I would generally avoid that. If you need to make computations on the client you can do:
7 replies