setQueryData does not pass existing data
I'm running into very strange behavior where calling
setQueryData does not include the existing data in the updater callback.
In the above code, the first console.log (L5) includes data, but the oldData inside the setQueryData callback is undefined. I have this code running in two different places with identical invocations, just different queryKeys – one works as expected, the other doesn't.1 Reply
sunny-greenOP•15mo ago
A little extra color: I'm just trying to employ this pattern for trimming pages off my infinite queries
TanStack | High Quality Open-Source Software for Web Developers
Headless, type-safe, powerful utilities for complex workflows like Data Management, Data Visualization, Charts, Tables, and UI Components.

