Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Persist meta in queries #5647

Closed
nahtnam opened this issue Jun 29, 2023 · 0 comments · Fixed by #5733
Closed

Persist meta in queries #5647

nahtnam opened this issue Jun 29, 2023 · 0 comments · Fixed by #5733

Comments

@nahtnam
Copy link
Contributor

nahtnam commented Jun 29, 2023

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

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

Successfully merging a pull request may close this issue.

2 participants