Skip to content
Source
Sign inSign up
TanStack/query

Persist `meta` in queries #5647

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

Describe the bug

Initially discussed here: https://discord.com/channels/719702312431386674/1121385264569397259

The meta is not persisted which can lead to interesting/unexpected (developer created) bugs

Your minimal, reproducible example

https://codesandbox.io/s/react-typescript-forked-j729lq?file=/src/App.tsx

Steps to reproduce

  1. Go to https://j729lq.csb.app/?query=1. You should get a pop up. Click confirm and refresh the page as many times as you want
  2. Go to https://j729lq.csb.app/?query=2. Same thing, you get a pop up. Click confirm and refresh as much as you want.
  3. Go back to your first tab and refresh the page. Instead of being cached, it now will give you a pop up again.

Expected behavior

Refreshing either tab should not cause the pop up to show up

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

  • OS: Macos
  • Browser: Chrome
  • Version: 114.0.5735.133

Tanstack Query adapter

react-query

TanStack Query version

4.29.15

TypeScript version

No response

Additional context

No response

  1. TkDodo added labelsenhancement

  2. TkDodo added labelspackage: query-persist-client-core

  3. TkDodo closed this

Sign in to join this conversation.