You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which area(s) are affected? (Select all that apply)
Data fetching (gS(S)P, getInitialProps)
Additional context
After updating my project to next.js version 13.5.5 I started seeing that my Node.js (express )server returns a lot of 429 responses as I set rate limiting for all routes. After further investigation I discovered that starting from 13.5.5 fetch requests does not get deduped even when documentation says it should.
Passing data between a parent layout and its children is not possible. However, you can fetch the same data in a route more than once, and React will automatically dedupe the requests without affecting performance.
And this issue preserved on all versions above. Interesting thing is that when my local project on Next version 13.5.4 works fine and request get deduped, when I installed 13.5.4 on the codesandbox it didn't change anything.
On my opinion this is one of the most important features for app router so it's strange it doesn't work, and I'm worried that even it works fine with 13.5.4 on my local server it may not work on the production as it doesn't work with codesandbox.
The text was updated successfully, but these errors were encountered:
yarikpetrenko
changed the title
Fetch doesn't automatically dedupe the requests
Requests are not automatically deduped (Request Memoization)
Nov 1, 2023
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
Link to the code that reproduces this issue
https://codesandbox.io/p/sandbox/gallant-tree-4yxvwz
To Reproduce
Current vs. Expected behavior
Verify canary release
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 23.0.0: Fri Sep 15 14:41:43 PDT 2023; root:xnu-10002.1.13~1/RELEASE_ARM64_T6000 Binaries: Node: 18.18.2 npm: 9.8.1 Yarn: N/A pnpm: N/A Relevant Packages: next: 14.0.1-canary.0 eslint-config-next: 13.4.13 react: 18.2.0 react-dom: 18.2.0 typescript: 5.2.2 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Data fetching (gS(S)P, getInitialProps)
Additional context
After updating my project to next.js version 13.5.5 I started seeing that my Node.js (express )server returns a lot of 429 responses as I set rate limiting for all routes. After further investigation I discovered that starting from 13.5.5 fetch requests does not get deduped even when documentation says it should.
And this issue preserved on all versions above. Interesting thing is that when my local project on Next version 13.5.4 works fine and request get deduped, when I installed 13.5.4 on the codesandbox it didn't change anything.
On my opinion this is one of the most important features for app router so it's strange it doesn't work, and I'm worried that even it works fine with 13.5.4 on my local server it may not work on the production as it doesn't work with codesandbox.
The text was updated successfully, but these errors were encountered: