Skip to content
Source
Sign inSign up
TanStack/query

SSR + suspense + solid-query does not seem to work #4510

Send to my agent
Closedmarbemac(GitHub profile, opens in a new tab) opened this issue 3 comments

Describe the bug

SSR + suspense does not seem to work with solid-query (or I'm doing something wrong on the implementation). I've included a minimum reproducible repo that compares solid-query vs basic createResource (which I looks like solid-query is using in some capacity under the hood, so maybe this is fixable!).

Your minimal, reproducible example

https://codesandbox.io/p/github/marbemac/solid-query-ssr-bug

Steps to reproduce

Turn off javascript and load up the solid-query route in the attached reproducible example. Under the hood it's just using a simple query, with a suspense wrapper (https://github.com/marbemac/solid-query-ssr-bug/blob/main/client/pages/solid-query.tsx), rendering on the server with renderToStringAsync.

Expected behavior

As a user, I'd like to leverage suspense + solid-query in SSR applications.

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

  • macOs

react-query version

4.15.1

TypeScript version

4.8.4

Additional context

  1. TkDodo added labelspackage: solid-query

  2. I think I remember @ardeora mentioning somewhere that there is no complete story for solid-query in SSR yet and that we wanted to wait until solid-start is stable. But I could be wrong / misremember 😅

  3. TkDodo added labelsenhancement

  4. Resolved by the variety of improvements Aryan and I made to solid-query over the last year.

Sign in to join this conversation.