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
How to do the Optmistic Update?
How would I manage a streamed response from the server?
Debounced Autosave
How to use `useSuspenseQuery` to ensure data is always there?
enabled
to decide if the query should be called. It is called each time but the undefined checks are annoying. Another approach is to retun null
early if (!accountId)
, which is also annoying.
Here is what I have so far:
```tsx
import { useSearchParams } from 'react-router-dom';...I hava a question for maintainer.
StrictNullCheck and dependant queries
cancelQueries does not seem to cancel trpc fetches
React native - mutations are paused, but are not in the queryClient paused mutations so don't resume
setQueryData changes in v5?
Argument of type 'Decimal' is not assignable to parameter of type 'Updater<void | undefined, void | undefined>'
Argument of type 'Decimal' is not assignable to parameter of type 'Updater<void | undefined, void | undefined>'
How to use react query data in another component without moving state up?
How to setQueryState to error
QueryClient.setQueryState
with the new data to update useQuery hooks for that query all over my app.
But what about when the state I want to update with is an error? How do I inform the QueryClient of an error?...How to organize react query project
services
with folders like users
, posts
, and there is file for server data fetching functions called api.ts
, and another file for queries and mutations (queriesAndMutations.ts
)
would it be better solution to rename api.ts for example for posts, to postService
, make it file that exports postService
= new class postService
, and there store all api calls as methods...page re-renders 100s of times when using with Wagmi (and SWR)
next.js
(pages)...How to access mutationState in v4? What is the pattern to work on project with many mutations?
useInfiniteQuery cache for useQuery
useInfiniteQuery
, results are stored in cache
```ts...onSuccess not avaivle in useSuspenseQuery
Question about useQuery definition
useQuery
data
property: https://tanstack.com/query/v4/docs/framework/react/reference/useQuery#:~:text=The%20last%20successfully%20resolved%20data%20for%20the%20query....Track data changes