Comments (3)
I think this is great! You've proven that the library is flexible enough to be extended or wrapped to handle complex situations. You may want to investigate the custom query key serializers in the docs to take it a step further. Otherwise, I think what you've shown here is sufficiently awesome. There is always a chance that two query key instances may not match up due to implementation, so as long as you're minimizing the risk of that happening, you're in good shape. That's precisely the reason why I added the string + variables approach
from query.
Oh, that's nifty and I indeed missed it (link for others).
I must say that section was a bit scary between the "experimental", "there can be dragons and edge cases", and the thing about "despising the default key". Tbh, I don't despise it, and I'm already fighting the big bad wolf day in day out with my kid, so dragons felt too much to handle ;).
I'll try that some time soon and probably post here again some updated snippets.
from query.
And thanks for taking the time to read through and provide feedback, appreciate it!
from query.
Related Issues (20)
- Font size is unusably small on v5 query inspector HOT 4
- [vue-query] Nuxt2 SSR demo not working as expected HOT 3
- Svelte Example: Playground is broken in docs
- What about Svelte 5? HOT 1
- `gcTime` is not working or, better, is useless if we use `persister` HOT 2
- #initialState set incorrectly to persisted state HOT 2
- Unit test for useMutation hook 's can't be mocked to run onError callback
- isFetchingNextPage is not always true in the next render cycle after fetchNextPage is called HOT 5
- Reload browser breaks garbage collection HOT 2
- `clear()` function does not clear the cache HOT 1
- not get data when log brower, but state in tanstack-query still here
- ReactQueryDevtoolsPanel is not exported from "@tanstack/react-query-devtools" or the docs are wrong HOT 2
- pageParam missing from default queryFn typescript definition HOT 3
- useIsMutating hangs application HOT 2
- <useSuspenseQuery> queryClient?: QueryClient cause infinite loop HOT 2
- unexpected caching when `queryKey` is undefined HOT 5
- useQueries returns error if provided array is empty HOT 2
- Don't work with Next.js 14.1.0 HOT 11
- useQuery not reflecting updated queryFn while refetching after queryKey Invalidation HOT 2
- ReactQueryStreamedHydration hydrated does not properly escape </script> 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.