Skip to content
Source
Sign inSign up
TanStack/query

Queries can show incorrect data #5924

Send to my agent
Closedshepherdjerred(GitHub profile, opens in a new tab) opened this issue 3 comments

Describe the bug

In some cases, TanStack query can return incorrect data when multiple related keys are used

Your minimal, reproducible example

https://stackblitz.com/edit/vitejs-vite-a9azfw?file=src%2FApp.vue

Steps to reproduce

  1. Go to this StackBlitz example.
  2. Read through the synopsis and expected behavior
  3. Click "swap" twice
  4. Notice that the invariants have been violated, and that incorrect data is being shown

Expected behavior

Reactivity updates should happen all at once so that invalid states cannot be observed

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

macOS Chrome 116.0.5845.110

Tanstack Query adapter

vue-query

TanStack Query version

4.34.0

TypeScript version

5.0.2

Additional context

No response

  1. TkDodo added labelspackage: vue-query

  2. @DamianOsipiuk fyi

  3. This issue should be the same as #5910

  4. thanks, closing as duplicate then.

  5. TkDodo closed this

  6. TkDodo added labelsduplicate

Sign in to join this conversation.