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 familiar with these patterns, you will see how to apply them to your Next.js and Remix applications.
In this chapter, we’ll cover the following topics:
- Why should I use React Query with server-side rendering...