Skip to content
Source
Sign inSign up
TanStack/query
Closedlcswillems(GitHub profile, opens in a new tab) opened this issue 7 comments

Hi,

This package looks really great! Does it support SSR (Server Side Rendering) like Apollo? Apollo is able to find all the requests in the view and fetch them server side.

Thank you for your work, Lucas Willems

  1. It will support pre-cache warming for SSR soon. Not until after react SSR supports async export and suspense will it be native.

    Tanner Linsley On Nov 6, 2019, 3:45 AM -0700, Lucas Willems <notifications@github.com>, wrote:

    Hi, This package looks really great! Does it support SSR like Apollo? Thank you for your work, Lucas Willems — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

  2. Thank you for your answer!

    If you have some time,

    • Could you give me a link about "react SSR and async support"? What is this? A search gave me nothing.
    • Why do you want to wait for Suspense? The SWR team also wait for it, but I don't see the link between your package or SWR and Suspense.
  3. SSR and suspense are not the same thing. To support suspense in an SSR m environment, the render to string methods of react Dom must be asynchronous. These features are on the roadmap for the react core team and hopefully will be released later this year. Until then, we can get around this by using pre-cache warming to ensure that there is data synchronously available in a query before you use the render to string SSR method

    Tanner Linsley On Nov 6, 2019, 5:55 AM -0700, Lucas Willems <notifications@github.com>, wrote:

    Thank you for your answer! If you have some time,

    • Could you give me a link about "react SSR and async support"? What is this? A search gave me nothing. • Why do you want to wait for Suspense? The SWR team also wait for it, but I don't see the link between your package or SWR and Suspense.

    — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

  4. I am driving in my car right now, else I would give you a link to the roadmap

    Tanner Linsley On Nov 6, 2019, 5:55 AM -0700, Lucas Willems <notifications@github.com>, wrote:

    Thank you for your answer! If you have some time,

    • Could you give me a link about "react SSR and async support"? What is this? A search gave me nothing. • Why do you want to wait for Suspense? The SWR team also wait for it, but I don't see the link between your package or SWR and Suspense.

    — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

  5. This explanation helped me to have a better understanding of what's behind the render to string methods of react Dom must be asynchronous, hope it helps

  6. Thank you for the link!! This is very clear

    • Pre-Seeding a Query will be available in the next major version
    • Prefetching and thus "Render While Fetching" Suspense will also be possible in the next release
  7. tannerlinsley closed this

Sign in to join this conversation.