[v4] Measure loading time of a query using QueryCache
Duplicated from https://github.com/TanStack/query/discussions/6730
Hey,
I'm implementing a hook that observes all queries coming to react-query and detects the ones that have poor latency. While implementing I stumbled upon an issue - loading queries have
dataUpdatedAt
always at 0 (because they're loading so there's no data yet). Because of that, I can only detect slow-loading queries only on a page reload when they're picked up from query cache.
How would I measure loading time of a query without a page reload, and if it takes more time to load than usual, to commit some kind of action? (in this case push a query to array)
This is my current implementation:
GitHub
[v4] Measure loading time of a query using QueryCache · TanStack qu...
Hey, I'm implementing a hook that observes all queries coming to react-query and detects the ones that have poor latency. While implementing I stumbled upon an issue - loading queries have data...
0 Replies