SSR Streaming with Solid Query and TanStack Start with Solid.js #10905
Replies: 1 comment
-
|
My understanding is that this is still an edge case in the Solid and TanStack Start integration. With React Query, the documented path is pretty clear around preloading, dehydration, hydration, and streaming. For Solid Query, the same pattern does not seem to map one to one yet, especially if you want the query to start on the server but not block the initial render. The workarounds you listed also match what I would expect: ssr false works, but gives up SSR benefits, ClientOnly works, but makes it client side only, ensureQueryData works, but blocks rendering until the data is available, and passing prefetched data into createQuery works for blocking or preloaded data, but does not really solve streaming. So I would treat this less as a configuration mistake and more as a current limitation or missing documentation around Solid Query and Start SSR streaming. The useful clarification from maintainers would probably be whether non blocking SSR streaming with createQuery is supposed to work in Solid Query today, and if so, what the recommended Start integration pattern is. If not, is the intended workaround currently ensureQueryData, blocking preload, or client only queries? Is Solid Query expected to reach feature parity with the React Query streaming examples? For now, I would probably use ensureQueryData for data that is required for the first meaningful render, and keep less critical or deferred data client side or behind a boundary until the Solid integration has a clearer streaming story. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently, when I try to use Solid Query in TanStack Start using the way React Query suggests it (https://tanstack.com/router/latest/docs/integrations/query, the Solid.js documentation is not complete), I am not able to concretely use
createQuery.If I disable SSR (
ssr: false), all the queries work as expected, but this comes with performance degradation.Putting the queries inside
<ClientOnly>also works, but this doesn't stream the data from the server.If I
ensureQueryDataon the server and pass the data in thecreateQueryit does work, but sometimes I don't want to wait for the data to load before rendering the page.Overall, SSR and Solid Query don't work as expected in TanStack Start.
Are there other ways or will this be fixed in newer versions?
Beta Was this translation helpful? Give feedback.
All reactions