react-query-questions
solid-query-questions
table-questions
virtual-questions
router-questions
react-charts-questions
ranger-questions
vue-query-questions
svelte-query-questions
bling-questions
form-questions
angular-query-questions
start-questions
db-questions
start-showcase
router-showcase
📣-announcements
Double query call using "use"
Caching prefetched data in a server component
Query without a queryFn but just manually using setQueryData?
Minimizing QueryKey Size with Dependent Queries
Streaming with server components
queryClient.prefetchQuery()
method from the advanced-ssr.md
guide explained here.
- I don't await the prefetch
- I use the shouldDehydrateQuery: (query) => defaultShouldDehydrateQuery(query) ||.state.status === 'pending'
setup, so streaming is "enabled".
- I use useSuspenseQuery
inside my component...useQueries slowing down the app (freezing for several seconds)
Using setQueryData inside a Mutation/QueryCache
setQueryData
inside QueryClient
?...Offline persistent mechanism for the error state
Removed data with AsyncStoragePersister + PersistQueryClientProvider
IMPORTANT - for persist to work properly, you probably want to pass QueryClient a gcTime value to override the default during hydration (as shown above)....
Preventing specific useSuspenseQuery hooks from running in SSR
useSuspenseQuery
tends to be more maintainable and correct than useQuery
. Thinking in Suspense
and ErrorBoundary
seems to scale well automatically.
- We want to migrate all data fetching to suspense
- We have SSR
- Some queries weren't build with the expectation of running on the server. They depend on client-only state....router.tsx for Convex + Start RC
<ConvexAuthProvider>
as a child of <QueryClientProvider>
. Is it redundant?
deps:
```json
"@convex-dev/auth": "^0.0.90",...Worrying about optimistic Update performance in UseInfiniteQuery
How can I tell if my query cache is being used successfully?
invalidateQueries does not work as expected
Caching for fetching multiple ids in different batches
"No QueryClient set" after react-query update to 5.85.6.
react-query
dependency in a react app from 5.85.5 to 5.90.1, which uses tanstack/react-router
. Suddenly I get
"No QueryClient set, use QueryClientProvider to set one
errors, but only in production (what bit me 😅 ).
I also noticed that the bundle size has been increased by 10 kb (unzipped).
...context.client undefined in react query V5
Docs: Optimistic Updates issue
To do this, useMutation's onMutate handler option allows you to return a value that will later be passed to both onError and onSettled handlers as the last argument. In most cases, it is most useful to pass a rollback function.
To do this, useMutation's onMutate handler option allows you to return a value that will later be passed to both onError and onSettled handlers as the last argument. In most cases, it is most useful to pass a rollback function.

When to use a utility and when to use a custom hook with select?

Best way to handle errors with multiple components sharing queries
