-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Closed as not planned
Labels
Description
Describe the bug
In my understanding, after setting cacheTime, the data should return the value from the previous request, rather than undefined.
Your minimal, reproducible example
https://github.com/ShiChenCong/useMutation-cacheTime-demo
Steps to reproduce
- reproduce repo
- pnpm install
- pnpm run dev
- click button
- log
undefined
- log
[1,2,3]
- click button again
- log
undefined
(this step, In my understanding, should log[1,2,3]
directly) - log
[1,2,3]
Expected behavior
return previous value rather undefined
How often does this bug happen?
None
Screenshots or Videos
No response
Platform
macOS
TanStack Query version
4.24.10
TypeScript version
No response
Additional context
reproduce repo https://github.com/ShiChenCong/useMutation-cacheTime-demo
, and mutation
did not show in the devtool too.