acronie
acronie16mo ago

Requests running multiple times after it's failing

Solution:
Query Retries | TanStack Query Docs
When a useQuery query fails (the query function throws an error), TanStack Query will automatically retry the query if that query's request has not reached the max number of consecutive retries (defaults to 3) or a function is provided to determine if a retry is allowed. You can configure retries both on a global level and an individual query ...
Jump to solution
3 Replies
acronie
acronie16mo ago
I am not sure why this is happening? this is where my request lies
export function Sidebar() {
const [isHovering, setIsHovering] = useState(false);
const { data: user } = api.user.me.useQuery();
export function Sidebar() {
const [isHovering, setIsHovering] = useState(false);
const { data: user } = api.user.me.useQuery();
Solution
Alex / KATT 🐱
Alex / KATT 🐱16mo ago
Query Retries | TanStack Query Docs
When a useQuery query fails (the query function throws an error), TanStack Query will automatically retry the query if that query's request has not reached the max number of consecutive retries (defaults to 3) or a function is provided to determine if a retry is allowed. You can configure retries both on a global level and an individual query ...
acronie
acronie16mo ago
Ah ha Got it