Replies: 1 comment 5 replies
-
|
Beta Was this translation helpful? Give feedback.
5 replies
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Uh oh!
There was an error while loading. Please reload this page.
-
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