How Next.js Request Memoization works with hey-api/client-next #2231
ZilvinasAbr
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, wanted to ask a question about how Next.js Request memoization works with
hey-api/client-next
client.How I tend to use hey-api client: I tend to mostly always create a new hey-api client for each BE call (except if multiple such calls are being made in the same function, then it is easy to just use the same one).
Now, should that be OK for Next.js's request memoization to work? E.g. If I rendered 50 server components, each creating its own hey-api client and each of them calling the same request to BE but each with its own hey-api client, would Next.js's request memoization work?
Why I'm asking: I might have found that in some cases request memoization does not work, so I wonder if that could be a case when the request's are being made with a different client? Is there a possibility for different hey-api client's to differently change the options sent to
fetch
?Beta Was this translation helpful? Give feedback.
All reactions