Skip to main content
Stack Overflow for Teams is now Stack Internal: See how we’re powering the human intelligence layer of enterprise AI. Read more >
Filter by
Sorted by
Tagged with
-1 votes
0 answers
51 views

In my React application, I want to implement a page that shows live data, such as the current status of a camera (on/off) and images taken by the camera, triggered by different events. I am using ...
programmingfun's user avatar
0 votes
2 answers
85 views

I have been using react query and next.js , I need to know how can achieve server side rendering using react query, I can achieve with this using normal fetch or axios in the server side components, ...
arjun tv's user avatar
0 votes
1 answer
33 views

I have a functionality where I have an id as a URL search param. So I get the id and send it to a Custom Select, which then filters the options that I send to it as a prop that I have fetched through ...
user19921081's user avatar
0 votes
1 answer
85 views

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/...
popof's user avatar
  • 11
0 votes
0 answers
38 views

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. ...
Byofuel's user avatar
  • 448
0 votes
1 answer
164 views

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%...
Byofuel's user avatar
  • 448
-1 votes
2 answers
117 views

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 ...
Andrey Rafalskyi's user avatar
0 votes
0 answers
73 views

I am working on a react native app that is using openapi-react-query in order to enforce the type safety across backend and mobile, my struggle is how to refetch queries (in a component other than the ...
Hamza Hmem's user avatar
2 votes
1 answer
185 views

I'm using Typescript 5, Next.js 15, tRPC 11, React Query 5 and React 19. How can I programmatically differentiate between DecoratedMutation<...> and DecoratedQuery<...>? I have tried: ...
his dudeness's user avatar
0 votes
1 answer
137 views

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 ...
samplecode3300's user avatar
0 votes
0 answers
29 views

I'm using React query, and my query client options look like the below: export const DEFAULT_POLL_INTERVAL = 2500; const queryClient = (pollingEnabled?: boolean) => new QueryClient({ ...
samplecode3300's user avatar
0 votes
2 answers
52 views

I am using tanstack-query and have dependent queries to do: const { resourceId } = useGetResourceId(); // resourceId: number | null const { data, loading, error } = useGetResourceData(resourceId); ...
zmii's user avatar
  • 4,339
0 votes
1 answer
203 views

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 ...
Gavin Wahl's user avatar
  • 1,321
0 votes
1 answer
73 views

In my react-native project, I use tanstack react-query: https://tanstack.com/query/latest/docs/framework/solid/reference/useQuery#isrefetching-boolean Why is isRefetching executed if I don't call ...
IncognitoUser's user avatar
1 vote
1 answer
98 views

I use an infinite list for which I prefetch data on the app startup. Everything works great except for when I hit 404 error if, for example, I manually change the url to a wrong one. Then the whole ...
magrega's user avatar
  • 263
0 votes
2 answers
120 views

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: ...
aRtoo's user avatar
  • 1,874
0 votes
0 answers
23 views

I'm using React Native/Typescript/Expo and Firebase (Auth, Firestore). I'm testing in web. I'm using Tanstack Query between my app and Firebase. I'm running into an issue where, when upserting a user ...
Mark Tielemans's user avatar
4 votes
0 answers
263 views

Recently I read about new hook useSuspenseQuery provided in @tanstack/react-query v5. Previously I have used useQuery and have written unit tests on it. I am trying to write unit tests on ...
Dhananjay Sakhare's user avatar
0 votes
0 answers
146 views

I have a client component that calls for data via trpc. I extract isLoading from those useQuery calls and then I want to display a loading skeleton while the data is loading. However, when I follow ...
crevulus's user avatar
  • 2,504
0 votes
0 answers
42 views

I have two media hide and unhide, I am using optimistic update approach from react query It works smoothly, the setup of my react is list of checkbox, 1 list for hidden and 1 list for non-hidden items....
Jerome's user avatar
  • 23
-1 votes
1 answer
61 views

I created an Auth context with tanstack query with login, logout, registration functions I can use in the respectively pages to handle the authentication. But everytime I either login or logout the ...
Matteo's user avatar
  • 1
1 vote
0 answers
21 views

I'm building a multi-step order form using React, react-hook-form, and react-query. Initially, there are three visible steps: customer information, product selection, and order summary. Depending on ...
Thore's user avatar
  • 1,928
1 vote
1 answer
513 views

I am using useSuspenseQuery from React Query to fetch data in a React app. While the API is fetching, I want to show a loading state using <Suspense fallback="Loading" />. The issue ...
jun's user avatar
  • 13
0 votes
0 answers
23 views

I have a mutation where I append a comment to the first page (pages[0]). In my onMutate, I cancel any ongoing refetches (if we're not fetching a subsequent page) and then refetch in onSettled Mutation:...
Max adam's user avatar
  • 105
0 votes
0 answers
59 views

I need to update all formulas in cache that use the same raw ingredient after it has been changed using tanstack query. In Tanstack Query I newbie My implementation but this code does not always work ...
Vasyl's user avatar
  • 1
0 votes
0 answers
44 views

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 ...
Deepak Nohawar's user avatar
0 votes
0 answers
35 views

how to write unit tests for useUpdateTodo hook without mock useGetUserId // Get the user const useGetUserId = ()=>{ const { data: user } = useQuery({ queryKey: ['user', email], queryFn: ...
StanStanStan's user avatar
1 vote
1 answer
102 views

I'm using useQuery function from React Query to fetch data in my React application. However, I'm encountering an issue where some requests take too long to download content (about a minute). Here's a ...
SeuZeRicardo's user avatar
3 votes
0 answers
388 views

When using useInfiniteQuery in React Native environments (Android and iOS), the app crashes with the error: "observer.getCurrentResult is not a function (it is undefined)". This error does ...
Johanan307's user avatar
0 votes
1 answer
207 views

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 ...
Yaseen Jabir's user avatar
1 vote
1 answer
279 views

I am trying to pass my access token to requests made with ky and retry them on 401 error with an updated token. On retry the token updates but the requests themselves still have the old token. How do ...
magrega's user avatar
  • 263
1 vote
0 answers
104 views

While migrating from the client-side row model to the infinite row model, my team and I are attempting to preserve the functionality of our custom Refresh/Cancel button. In the client-side row model, ...
Supernectar's user avatar
0 votes
0 answers
92 views

I have set up a react native monorepo using Yarn Workspaces. The goal would be to write one App as core, and the versions for different platforms would be siblings of core in the monorepo and would ...
Adrian Bunea's user avatar
0 votes
1 answer
288 views

I have 2 instances of storybook running an application locally. I have 2 tabs open on localhost:6006 and localhost:6007, and I log in as a different user on each. I do things in 1 tab that ...
Aaron Parisi's user avatar
0 votes
1 answer
903 views

I have a mutation that comprises of a sequence of long-running actions: useMutation({ mutationFn: async () => { await firstTask() await secondTask() await thirdTask() }, ... }) I ...
Undistraction's user avatar
3 votes
2 answers
769 views

I have a Project type in my app. I need to be able to access it via two separate async function: getProductBySlug getProductById At the root of the page I use the URL to derive the slug and query ...
Undistraction's user avatar
0 votes
1 answer
39 views

I am using react-query for infinite loading feed and '@tanstack/react-virtual' for virtualization of the cards which are composed of mui elements. I want to keep my app height to 100vh so there's no ...
magrega's user avatar
  • 263
0 votes
1 answer
445 views

I want to use useSuspenseQuery along with next js so that I can take advantage of the built-in React feature. But when using useSuspenseQuery, it gives an error img query const { data, isLoading } = ...
И И's user avatar
  • 1
1 vote
1 answer
123 views

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 ...
Zirnael's user avatar
  • 13
0 votes
2 answers
88 views

I have an app with cards. Cards are fetched with useInfiniteQuery from React Query. I fetch new card each time I reach the end of the list. Backend sends offset and limit based responses of this ...
magrega's user avatar
  • 263
0 votes
1 answer
399 views

I'm building an Expo React Native app using Expo Navigation (Stack Navigator) and React Query. When navigating between screens (e.g., from Home to Test screen and back), I need to refetch data when ...
robo's user avatar
  • 119
0 votes
1 answer
649 views

Can I use TanStack Query with the below code example as a replacement of client-side state managers such as Zustand or Redux and therefore, have only one single state manager across the application? ...
Reza Alizade's user avatar
0 votes
0 answers
219 views

When using a list with infinite scrolling using useInfiniteQuery that has a contentContainerStyle with a percentage value for paddingHorizontal the list is not rendered at all. Here is the List ...
sambouchard-newforma's user avatar
0 votes
1 answer
69 views

I have search form, and i only want to call the api when selectedPage or resultsPerPage change or when user click on search after write some things in the form. With this, the api is called when the ...
Jorge Montejo's user avatar
0 votes
1 answer
280 views

I've noticed that many users of my app get unexpected runtime errors because react-query (v5.64.2) query data contains an empty object (and my backend never returns empty objects). I've also noticed ...
Misha's user avatar
  • 351
1 vote
1 answer
87 views

I use optimistic updates for the UI and it works, but the data is not re-fetched. In the server terminal I see only a DELETE request. There should be a GET right after it queryClient.js import { ...
Georgios 's user avatar
0 votes
0 answers
29 views

I added the initialPageParam, and I'm still getting this error on my queryFn. I don't understand why I can't provide a () => void function when a QueryFunction<InfiniteScrollPost[], readonly ...
Anise Apple's user avatar
1 vote
1 answer
215 views

I have a React project where I am using React Query and TanStack Table. Occasionally, my component enters an infinite re-render loop, and I can't figure out why. Sometimes it works perfectly fine, and ...
Berkay Çelikkol's user avatar
-2 votes
1 answer
152 views

So this is the first part is from a component where i create new habitats using tanstack V5 im passing queryKey ['habitats'] const createHabitatMutation = useMutation({ mutationFn: habitatService....
tabet's user avatar
  • 7
-1 votes
1 answer
118 views

I have a very simple react application using React Query with two react components: App and BotConfig. I am experiencing React Query functions within a component change their behavior from working as ...
Thomas H's user avatar

1
2 3 4 5
38