7

Server-Side Rendering with Next.js or Remix

Not all of our applications are rendered on the client side. Using frameworks that leverage server-side rendering (SSR) is common nowadays. These frameworks have helped improve application performance, and their adoption is growing daily.

Now, when using these frameworks, most of the time, we tend to perform data fetching or mutations on the server side, which leads to the question:

Do I still need React Query with an SSR framework?

In this chapter, you’ll understand how React Query fits with frameworks such as Next.js and Remix and helps improve your user experience. You will also learn about the two patterns you can apply to React Query with these frameworks: initialData and hydrate.

Once you are ...

Get State Management with React Query now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.