One way to deduplicate fetch requests is with request memoization. With this mechanism, fetch calls using GET or HEAD with the same URL and options in a single render pass are combined into one request. This happens automatically, and you can opt out by passing an Abort signal to fetch.
Request memoization is scoped to the lifetime of a request.
You can also deduplicate fetch requests by using Next.js’ Data Cache, for example by setting cache: 'force-cache' in your fetch options.
Data Cache allows sharing data across the current render pass and incoming requests.
If you are not using fetch, and instead using an ORM or database directly, you can wrap your data access with the React cache function.
