Skip to content

Fix: Infinite render loops in react-query v4.29.22 and up - #5839

Merged
TkDodo merged 2 commits into
TanStack:mainfrom
Komoszek:main
Aug 5, 2023
Merged

Fix: Infinite render loops in react-query v4.29.22 and up#5839
TkDodo merged 2 commits into
TanStack:mainfrom
Komoszek:main

Conversation

@Komoszek

Copy link
Copy Markdown
Contributor

@vercel

vercelBot commented Aug 4, 2023

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
NameStatusPreviewCommentsUpdated (UTC)
query⬜️ Ignored (Inspect)Visit PreviewAug 4, 2023 9:36pm

@codesandbox-ci

codesandbox-ciBot commented Aug 4, 2023

Copy link
Copy Markdown

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:

SandboxSource
@tanstack/query-example-react-basic-typescriptConfiguration
@tanstack/query-example-solid-basic-typescriptConfiguration
@tanstack/query-example-svelte-basicConfiguration
@tanstack/query-example-vue-basicConfiguration

@nx-cloud

nx-cloudBot commented Aug 4, 2023

Copy link
Copy Markdown

☁️ Nx Cloud Report

CI 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


🟥 Failed Commands
nx affected --targets=test:eslint,test:lib,test:types,test:build
✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

@TkDodo

Copy link
Copy Markdown
Collaborator

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

Copy link
Copy Markdown
Collaborator

@incepter fyi

@TkDodo

Copy link
Copy Markdown
Collaborator

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

Copy link
Copy Markdown
ContributorAuthor

@TkDodo I've added the test case like you've asked

@TkDodo
TkDodo merged commit cfd6133 into TanStack:mainAug 5, 2023
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Infinite render loop with v4.29.{22,23}

2 participants

@Komoszek@TkDodo