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
I'm working with optimistic updates and data gets mutated fine but not reverted when an error occurs
full_name field in my profile object gets updated correctly when the user submits the form. But when I throw the error on purpose the data that got updated does not revert back.
https://tanstack.com/query/v4/docs/react/guides/optimistic-updates
```...Creating NPM Package That Uses react-query
useQuery will that query have access to the application's QueryClientProvider? In this case the application would call the exported function.Firefox Input type=date would trigger function after useQuery success to run again
How to imperatively get a single resource
creating a custom useMutation hook
property does not exist on type void Does this mean i need to pass generics to infer the types?...
Recommended code generator for creating react query hooks from OpenAPI specs
Creating a query that polls an endpoint but ends when server returns specific value
const { currentData, isError } = api.endpoints.pollingEndpoint.useQueryState(args);
usePollingEndpointQuery(args, { pollingInterval: 3000, skip: !args || currentData?.complete })
const { currentData, isError } = api.endpoints.pollingEndpoint.useQueryState(args);
usePollingEndpointQuery(args, { pollingInterval: 3000, skip: !args || currentData?.complete })
How to preload data for a component before rendering it
:white_check_mark: How to tests calls to query client passed in function?
Trigger select in useQuery after arbitrary event
select business logic depends on an external state. When the external state is updated I want that select to re-evaluate the result and maybe re-render component if structuralSharing advises for it. Is there any way to trigger select in useQuery utilizing internal react-query API avoiding network request/invalidation?
PS: Majority of my useQuery calls have this kind of select with external state dependency, so global refresh() method would be handy, something like QueryCache.refresh()...How to handle redirect from query
Use of graphql-upload
Accessing onError, onSettled in the component the mutation was called
Is this weird rollback due to an unwanted re-fetch? (optimistic updates)

How to use React Query with React's Context API
why serving from cache mechanism stops working?
@tanstack/react-query and react-router-dom for a simple app. The moment I introduce routing mechanism serving data from cache stops working and every request for data seems to trigger full scale request over the network.
here is the sample app: https://stackblitz.com/edit/vitejs-vite-gsg5rw?file=src%2FApp.tsx,src%2Fhooks%2FuseCharacterDetails.ts,src%2Fhooks%2FuseCharacters.ts&terminal=dev...useQuery staleTime doesn't work for local (fake) fetcher functions?
staleTime configuration (e.g., { staleTime: 20000 }) to this line doesn't work?
I expect the checked favorites to remain the same when I reload the page:
https://github.com/NarniaT/favorites-react/blob/c33178fca25f77ca65da619abfcb54f6dce397c2/src/hooks/useFavorites.ts#L12
getFavorites is a local (fake) fetcher, so React Query doesn't work in case of such local fetchers, or there's another issue I'm missing in my code?...Sharing a cache across <iframe>s
contextSharing is deprecated but wasn't sure if it's just something that just works automatically now or didn't work well before and won't work? Thanks in advance!`No QueryClient set, use QueryClientProvider` jest test error despite passing queryClient