396 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
1
answer
739
views
What is the use case for TanStack Start useServerFn hook
I am currently exploring TanStack Start (with React).
At What are Server Functions? page we have example of server function that can be used with useQuery (from TanStack Query, to fetch data from ...
0
votes
0
answers
35
views
Tanstack Query: Multiple chained POST calls with rollback
I have an issue where I need to make 3 chained POST calls using Tanstack Query.
POST with query 1
If query 1 fails, stop
If query 1 succeeds, make POST query 2
If query 2 fails, rollback query 1
If ...
0
votes
1
answer
113
views
How can I have a delay until useQuery/refetch have returned the data
I am developping an iOs/Android App with React Narive.
I am using useQuery (TanStack Query v5) to send the username and an hashed password to my database and it return the user ID if the email/...
0
votes
0
answers
49
views
Can a Tanstack query function return the results of another query function?
We're in an awkward situation needing to consume an API endpoint that is not built correctly. It returns pages of (unsortable) records without revealing beforehand how many pages there are in total.
...
0
votes
1
answer
217
views
Can Tanstack/React Query handle dynamic parallel queries that are computed based on earlier queries?
I see that Tanstack Query supports parallel queries in a certain way that is dynamic, per this page: https://tanstack.com/query/latest/docs/framework/react/guides/parallel-queries#:~:text=each%...
-1
votes
2
answers
135
views
React hook form + react query. Sync defaultValues on refetch without clobbering dirty fields, and hard-reset after submit [closed]
Context
I’m using React Hook Form together with React Query. The parent component fetches data with a query, derives defaultValues, and passes them into the form.
Parent component:
export const ...
0
votes
0
answers
22
views
React Query Cache Not Updating After File Upload - Manual Invalidation Required
Problem
After uploading new trade files through an "Upload New File" dialog, the trade reconciliation table shows stale data from the previous upload instead of the updated data. The table ...
0
votes
1
answer
93
views
problem with Hooks and Components: Error Invalid hook
I’m building a react native app using expo and I created a component called FlightList.tsx that fetches flight data using a custom hook useFlightList.tsx (which internally uses React Query’s useQuery)....
2
votes
0
answers
75
views
TanStack query local storage full
We are using TanStack query (Vue) for storing a lot of states in the local storage.
But what happens if the local storage is full?
Will it just discard the oldest query if we store a new query?
0
votes
0
answers
127
views
How to use queryClient.prefetchQuery/usePrefetchQuery to cache next set of results in TanStack Query in React?
I am creating a dating app's swiping page in React using TanStack Query. When swiping on the last user in a batch of profiles received from the database, the user has to wait for the next batch to be ...
0
votes
1
answer
175
views
TanStack Query useMutation is not return isSuccess true after success response
I have an authentication system. calling Api's using tanstack query.
When logging in, signing up, and verifying email using the link, everything works fine. However, when I check the mutation's ...
0
votes
1
answer
163
views
RefetchInterval, and QueryKey Changing, will this cause two network requests?
Really need some help understanding the nuances and effects of how refetchInterval, and queryKeys interact with each other.
Currently, I have a UI that is stuck on loading state. I suspect it is ...
0
votes
2
answers
53
views
How to make react-query wait till input data used in request is resolved with other API call?
I am using tanstack-query and have dependent queries to do:
const { resourceId } = useGetResourceId(); // resourceId: number | null
const { data, loading, error } = useGetResourceData(resourceId);
...
0
votes
0
answers
233
views
Implementing Tanstack Query default query function with common api hook
I am new to React and TanStack and i try to write a React SPA (TypeScript) which shows up a data table after a successful login.
The project uses TanStack Query V5, axios for data fetching and React ...
2
votes
1
answer
90
views
how to manage jotai atoms effectively to prevent circular dependency when using joati on frontend, with react-query?
I am trying to create a sort of complex react/jotai game with a next.js frontend server router connected to an express/node.js backend server.
I keep getting circular dependency issues.
I tried using ...