404 questions
-1
votes
0
answers
18
views
React Query data update works in dev but not in production (Expo Router, minified build) [closed]
I have a React Native app using Expo Router and React Query. I fetch a list of items using useQuery and display them in a FlatList. I also have a mutation using useMutation to add a new item.
In ...
-1
votes
1
answer
418
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
1
answer
88
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
1
answer
170
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%...
0
votes
0
answers
20
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 ...
2
votes
0
answers
65
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
1
answer
148
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
2
answers
52
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);
...
2
votes
1
answer
84
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 ...
0
votes
1
answer
206
views
Put query into isPlaceholderData with QueryClient methods (while using keepPreviousData)
I have a query that uses placeholderData: keepPreviousData. This means the
query is in a hard loading state, with no placeholder data, on initial mount.
Then, when the queryKey changes, it goes into a ...
0
votes
0
answers
74
views
How to pass extra data to tanstack useMutation?
I have several requests to add and change data:
const updateRwStationsQuery = (id: string, data: RwStationDto) => {
return apiInstance<RwStationDto>(`/rwstations/${id}`, {
method:...
0
votes
0
answers
230
views
Vite + TanstackRouter + SSR
How to Properly Hydrate a TanStack Router + Vite SSR App Without Using TanStack Start?
I'm trying to implement server-side rendering (SSR) in a TanStack Router + Vite React project without using ...
0
votes
2
answers
124
views
How to refetch from a client component with useQuery
I have a client component that fetches the list of project and a dialog box that creates a project but I cant update the project list unless I have to do a manual refresh on the browser.
The flow is:
...
0
votes
1
answer
121
views
Unknown timeout error when refetching a query
I am having a dumb moment. I use Tanstack Query and Ky in my app to make requests and inject jwt tokens in them. Every time a request hits a 403 error, the request gets resent after acquiring a new ...
0
votes
1
answer
120
views
How to invalidate a query with specific parameters using queryClient.invalidateQueries in React Query v5
I’m using React Query to manage my queries, and I have a scenario where I need to invalidate a query with specific parameters.
useQuery({
queryKey: ["users", { page: 2, pageSize: 20 }],
queryFn: ()...
0
votes
0
answers
162
views
Troubleshooting createTRPCOptionsProxy with Server Components and Context Passing
How does createTRPCOptionsProxy work in server components?
I'm creating a context that passes the hono context to createTRPCContext in order to obtain the HTTP headers, since I need to forward those ...
0
votes
0
answers
51
views
Electron Vite dist build not referencing dynamically imported form-data package required by Axios for dist build
Im building an Electron App with Vite that uses Axios. It seems that Axios requires a dynamically imported package called form-data. When running my built .exe portable after Ive built it I get the ...
0
votes
0
answers
45
views
"Error: No QueryClient set" when using TanStack Query in a component package across repositories in Next.js
I have a Next.js application (main-app) that imports and uses UI components (widgets) and API hooks from a separate repository (abc-widgets).
These widgets internally use API hooks that rely on ...
0
votes
1
answer
369
views
implement simple pagination in Nextjs 15X
I am Vue developer for years ,
now I am trying to learn Reactjs and Nextjs.
and I am implementing user list page that include pagination ,
I have some problem with that
this is my code :
"use ...
0
votes
0
answers
75
views
React Query Stuck in Loading State on 406 Not Acceptable Response with Axios
I'm using React Query (@tanstack/react-query) to fetch RDF data from an API with Axios, but when the API returns a 406 Not Acceptable response, the query remains in a loading state indefinitely ...
0
votes
1
answer
212
views
how to use React Query (TANStack) in next js server components?
A lot of people are saying that use React Query for efficient data retrieval. But to use useQuery hook I have to make every component "client component" then what would be the purpose of SSR ...
0
votes
1
answer
123
views
Unnecessary re-rendering and API calls using Tanstack table and Tanstack Query
I'm using React with @tanstack/react-table and react-query to implement a paginated table with server-side filtering and sorting. I'm encountering an issue where selecting a date filter sometimes ...
0
votes
1
answer
911
views
Canceling a react-query mutation
I have a mutation that comprises of a sequence of long-running actions:
useMutation({
mutationFn: async () => {
await firstTask()
await secondTask()
await thirdTask()
},
...
})
I ...
2
votes
1
answer
802
views
Adding Tanstack react-query to laravel 11 reactjs inertia project
Any idea how to add tanstack react-query to laravel 11 reactjs project?
The apps.jsx looks like this
const appName = import.meta.env.VITE_APP_NAME || 'Laravel';
createInertiaApp({
title: (title) =...
1
vote
1
answer
128
views
Does the refetch interval timer begin at the start of a request or after the request completes?
If refetchInterval is set to 10 seconds in useQuery, and a given request takes 2 seconds to complete, will the next request be initiated 10 seconds after the start of the previous request, or 10 ...