You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
In my application, using version 5.45.0, I get this weird thing where sometimes the
select
function is called twice.Here are some takeaways from my debugging session :
select
function is defined out of React scope, so it is not the function that changes.data
argument is the same one (I tested with strict equality===
) as during the previous call.select
function, the problem disappears, which supports the previous point.I've noticed that in https://github.com/TanStack/query/blob/main/packages/query-core/src/queryObserver.ts#L470, the
prevResultState.data
isundefined
when I have the problem, which seems to be the cause of the new call toselect
.I tried to reproduce the bug in a codesandbox but unfortunately failed.
Could this be a bug or is there something obvious that I am missing?
Beta Was this translation helpful? Give feedback.
All reactions