Uh oh!
There was an error while loading. Please reload this page.
Fix: Infinite render loops in react-query v4.29.22 and up - #5839
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit a3532fb:
|
☁️ Nx Cloud ReportCI is running/has finished running commands for commit a3532fb. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this branch
✅ Successfully ran 1 targetSent with 💌 from NxCloud. |
TkDodo
commented
Aug 4, 2023
thanks. codesandbox doesn't work so I can't verify the fix. Can you add the failing reproduction as a test case please? It was this one: https://codesandbox.io/s/confident-visvesvaraya-t8hzwk?file=/src/App.js |
TkDodo
commented
Aug 4, 2023
@incepter fyi |
TkDodo
commented
Aug 4, 2023
so this does indeed seem to fix the reported reproduction, here's a fork of the reproduction depending on the codesandbox preview build: https://codesandbox.io/s/keen-fast-rxg5rk?file=/package.json |
Komoszek
commented
Aug 4, 2023
@TkDodo I've added the test case like you've asked |
Fixes#5719. Shalow
!==would always returntrue, because https://github.com/TanStack/query/blob/9b8b5f0a81bc68552bbafbc3991e7e89a893ecbe/packages/query-core/src/queryObserver.ts#L243C19-L243C19 AFAIK always gives new object.