Skip to content

Calling useQueries with an empty array leads to unlimited rerenders with the latest version of query #6645

Description

@veithlukas

Describe the bug

When passing an empty array to useQueries it leads to a rerender loop -> see reproduction example

I think the same bug got also mentioned also in an unrelated other issue: #6631 (comment)

Your minimal, reproducible example

https://stackblitz.com/edit/vite-react-ts-effjcj?file=src%2FApp.tsx

Steps to reproduce

See console for re-render loop :)

Expected behavior

Re-render loop isn't expected...

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

macOS Chrome

Tanstack Query adapter

react-query

TanStack Query version

5.17.1

TypeScript version

No response

Additional context

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions