Comments (2)
How about using a combination of isCached and isFetching
isFetching: Boolean
Will be true if the query is currently fetching, including background fetching.
When both isFetching and isCached are true then your data is from the cache.
When isFetching is false, your data is the latest that came from net
from query.
Indeed. isCached will be true if there is synchronous data available in the query cache.
from query.
Related Issues (20)
- solid-query Hydration Mismatch on SSR from version 5.24.2+ HOT 1
- Depracted warnings when installing @tanstack/react-query@latest HOT 1
- Devtools Picture-in-Picture not Working With `shadowDOMTarget` HOT 4
- getQueryData suddenly returns undefined for a query even though no update to query data has occurred HOT 1
- useSuspenseQueries inference differ from useQueries inference HOT 2
- Redundant queries invalidation when combining `useQuery` with `fetchQuery` in v5 HOT 10
- Error is reset to null during invalidation HOT 2
- UI reflection using firebase in react-query is it possible in offline mode ? HOT 1
- i have firebase + react query and i want to show data offline HOT 5
- When using PersistQueryClient, staleTime on query is not respected HOT 1
- Cached data is sometimes lost HOT 3
- Solid Query hydrates wrong query key HOT 2
- codemod: ERR_REQUIRE_ESM when migrating from v4 to v5 HOT 1
- createQueries prevent SolidStart SSR page from loading
- invalidateQueries / refetchQueries / setQueryData on mutation success not triggering the rerender of all consumers HOT 1
- Solid Query: `reconcile` and `placeholderData` don't work together HOT 2
- React Query devtools restore loading action doesn't restore loading state, freezes tools HOT 6
- Combination of skipToken and useSuspenseQuery not working HOT 1
- Vite warnings when Sourcemaps are enabled HOT 1
- useInfiniteQuery breaks array order in get request and missing returned data HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from query.