Closed fl-y closed 11 months ago
Please lmk if this info is not enough to figure this out - I'm much more available on twitter, feel free to reach out on https://twitter.com/cosmonaut_joon
Please create a small codesandbox reproduction that shows the issue.
I am having an issue with useQueries
after version 5.15.5. It is causing 1000s of rerenders in a second, quickly bringing the browser to a freeze. I suspect this commit is the culprit.
I could not reproduce this in code sandbox yet. I will open an issue when I can. But I would appreciate if you could fix this if you have an idea what might be causing this.
@KurtGokhan yes please create a separate issue, I wouldn't want to mix issues around useQuery
with ones about useQueries
.
The commit you showed revert a change and added another condition to the early bailout from setData
(&& newObservers.length > 0
) which should only have an effect if you call useQueries
with an empty array. So I don't immediately see how this could lead to infinite re-renders (we also have tests to guard against this I think)
Noticed the issue was fixed on the latest version, I think the referenced merge PR fixed it - closing. Sorry for not supplying extra info, forgot to keep tabs on the issue 🙈
Appreciate it sir 🫡
Describe the bug
Took half a work day to figure out it was due to a minor upgrade issue but you can see this happening when switching routes from the
/withdraw
page and then clicking on thestake menu
on this commit which takes much longer than this commitTook a while but I've pinned it down to this only occurring when upgrading
@tanstack/react-query
,@tanstack/react-query-devtools
,@tanstack/react-query-persist-client
version from 5.15.0 to 5.17.0I haven't figured out exactly what the cause is but only know for certain it's from tanstack.
One symptom I've noticed is that on redux devtools extension it seems to spam
navigate
as can be seen in this loom recording https://www.loom.com/share/9afe86017be8422eb36cd5fc61c0d677Here are the list of dependencies I'm using on the project.
node: 18.18.2 pnpm: 8.13.1 happens everywhere, dev, local builds, deployed on Vercel. I use the app directory on Nextjs and turborepo.
This is my nextjs config
Your minimal, reproducible example
Explained above
Steps to reproduce
Explained above
Expected behavior
The route to load without 'navigate' spamming
How often does this bug happen?
Every time
Screenshots or Videos
Posted above
Platform
platform agnostic
Tanstack Query adapter
react-query
TanStack Query version
5.17.0
TypeScript version
^5.2.2
Additional context
Appreciate all things tanstack so much sir - the one package I cannot live without 🫡