Skip to content

Query DevTools is not isolated #9681

Description

@fernion

Describe the bug

If we have multiple instances of Query DevTools, actions on one affect the other instance.

Your minimal, reproducible example

https://stackblitz.com/edit/tanstack-react-query-dev-tools-issue?file=README.md

Steps to reproduce

Open the example on the provided link

  1. Open the devtools
  2. Click on Query A and Query B to see both dev tools panels (each has its own query client)
  3. Click on a query on Query A
  4. Click on a query on Query B
    1. We see that the previous panel's details are hidden
  5. Press trigger loading (or any other query option)
    1. We see the same query details on both panels now

Expected behavior

Each query devtools should be isolated and actions in one should not affect the other one

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

  • OS: Linux
  • Browser: Brave

Tanstack Query adapter

react-query

TanStack Query version

v5.76.1

TypeScript version

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions