Skip to content

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

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

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

Conversation

@Komoszek
Copy link
Contributor

@Komoszek Komoszek commented Aug 4, 2023

@vercel
Copy link

vercel bot commented Aug 4, 2023

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

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
query ⬜️ Ignored (Inspect) Visit Preview Aug 4, 2023 9:36pm

@codesandbox-ci
Copy link

codesandbox-ci bot commented Aug 4, 2023

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:

Sandbox Source
@tanstack/query-example-react-basic-typescript Configuration
@tanstack/query-example-solid-basic-typescript Configuration
@tanstack/query-example-svelte-basic Configuration
@tanstack/query-example-vue-basic Configuration

@nx-cloud
Copy link

nx-cloud bot commented Aug 4, 2023

☁️ 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
Collaborator

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
Copy link
Collaborator

TkDodo commented Aug 4, 2023

@incepter fyi

@TkDodo
Copy link
Collaborator

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
Copy link
Contributor Author

Komoszek commented Aug 4, 2023

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

@TkDodo TkDodo merged commit cfd6133 into TanStack:main Aug 5, 2023
Sign up for free to 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