query icon indicating copy to clipboard operation
query copied to clipboard

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

Open marbemac opened this issue 2 years ago • 2 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

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

marbemac avatar Nov 14 '22 20:11 marbemac

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 😅

TkDodo avatar Nov 16 '22 19:11 TkDodo

https://twitter.com/aryan__deora/status/1592025888761446400

OrJDev avatar Nov 18 '22 07:11 OrJDev

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

marbemac avatar Sep 20 '23 17:09 marbemac