Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
0 votes
0 answers
25 views

React-query sometimes render with no uses value and i don't know why

I try to make infinite scroll. And i found out sometime react query fetch twice. for example, it should fetch only second page, but some time fetch second and third pages. (I'll call this a bug in the ...
PARKGEONTAE's user avatar
-4 votes
0 answers
41 views

I need help about how should use mutation fn in the react project [closed]

I am new in coding and try to learn react. I try to usemutation hook for my component and in this I need a mutation fn, where I face this Error: No overload matches this call. The last overload gave ...
Razieh's user avatar
  • 13
0 votes
0 answers
63 views

React query not updating data even after refetch shows new data from api

I am using react query to fetch a list of items. After creating a new item, I am calling refetch on my query to get the updated list. I see a new api call is made, and the new item I just created is ...
Seth Lutske's user avatar
  • 10.3k
1 vote
0 answers
66 views

Unhandled Runtime Error: data is undefined in useSuspenseQuery with Next.js and Tanstack Query

I am working on a Next.js application where I have implemented a commenting system. Users can post a review for a particular AI tool, reply to a review, and reply to a reply as well. I have a ...
HKS's user avatar
  • 833
0 votes
0 answers
32 views

How to make `refetchQueries` trigger regardless of whether data is cached or not?

import { useMutation, useQueryClient } from "@tanstack/react-query"; import api from "./Api"; export const useUploadProduct = () => { const qc = useQueryClient(); return ...
Muh-Osman's user avatar
  • 291
0 votes
0 answers
34 views

React Query: How can I disable a query based on whether there is data in the database?

I'm using a simple custom hook to fill in a form with data that a user may have previously entered in previous sessions. export function useGetData() { return useQuery({ queryFn: ...
Nick Whitfield's user avatar
1 vote
2 answers
219 views

How do I fix this error: Query data cannot be undefined. Please make sure to return a value other than undefined from your query function

I have the following code. import Post from "../post/Post"; import "./posts.scss"; import {useQuery} from "@tanstack/react-query"; import {makeRequest} from "../../...
Mandeep's user avatar
  • 65
-1 votes
1 answer
119 views

React Query useQuery can't trigger repeat call on click

I have a table of info where each row has a button to trigger a useQuery that will eventually open a new tab where more info about that row can be seen. I can trigger the call to work as expected the ...
physicsboy's user avatar
  • 6,082
0 votes
1 answer
35 views

How can all APIs be refreshed in a React component when any action is triggered?

import AppTextInput from '@/components/form-fields/AppTextInput'; import Iconify from '@/components/iconify/Iconify'; import AppButton from '@/components/templates/AppButton'; import AppDataGrid from '...
azath's user avatar
  • 9
0 votes
2 answers
71 views

Why my React Query does not instant update UI after delete? USING SUPABASE

Whenever delete is performed, supabase database is updated instantly but not in UI, If manually refreshed then updated list is shown to the UI... what to do please help!! I have added EntryTable, ...
Arit Nath's user avatar
1 vote
0 answers
59 views

TypeError in Tanstack Query React

I am new to react tanstack query and I am building a todo list app to reinforce the concepts that I am learning. The todos are coming from DummyJson API -https://dummyjson.com/docs/todos. The response ...
Ope Afolabi's user avatar
0 votes
0 answers
103 views

Getting the error " Should have a queue" when using React-Query mutation

I'm trying to figured out how to implement react-query in my react-native app. I'm executing a simple firebase login function from react-query mutation. Then in my signIn component I will call the ...
scholarwithfire's user avatar
0 votes
1 answer
52 views

How to execute Pagination in firebase or react query

i'm trying to paginate my products from my firebase firestore but the products are not loding its returning null or undefined here is my state context i just dont seem to get it right const [items, ...
Ashia 20's's user avatar
0 votes
0 answers
128 views

Why do I keep getting an error saying query client isn't set?

I'm trying to use React Query but it's been excruciatingly difficult to setup. Been stuck on this for like 3hrs already. I've tried everything under the sun to resolve the Uncaught Error: No ...
sp92's user avatar
  • 937
0 votes
1 answer
229 views

Make react-query useMutation to handle an Error

There's a strange issue which I don't undrestand - react-query's useMutation doesn't handle an error while @tanstack/react-query's does. A Sandbox import { useState } from "react"; import { ...
Victor Zhuravlev's user avatar

15 30 50 per page
1
2 3 4 5
29