Home / Companies / Apollo / Blog / Post Details
Content Deep Dive

How to use Apollo Client with Next.js 13

Blog post from Apollo

Post Details
Company
Date Published
Author
Patrick Arminio
Word Count
2,036
Language
English
Hacker News Points
-
Summary

The experimental library for Next.js makes it easier to use Apollo Client with the App directory in Next.js 13. The main feature is the introduction of React Server Components, which allows data fetching on the server, removing the need for client-side fetches in most cases. The library provides a way to get an instance of Apollo Client every time it's needed and makes sure that only one instance is created per request. It also handles caching for Next.js and provides a `useSuspenseQuery` hook for streaming SSR rendering. With this library, you can use Apollo Client in both Server Components and Client Components, making it easier to manage data fetching and caching in your Next.js application.