js Why does useQuery run 4 times and then stop with an error in Reactjs?
I'm using useQuery inside a custom hook, called usePostData. this is the custom hook code: import { useQuery } from "@tanstack/react-query"; import axios from "axios"; const usePostData = (queryKey, endPoint, object) => useQuery( [queryKey], async () => { await axios…