React Query is repeating axios requests from useTodos


Don’t know why, but in my side every time that I refresh my page. The useTodos get request is called 4 times. I noticed that in Mosh videos this is not happening. Can someone explain?

Heres my config for the request:

const useTodos = () => {
  const fetchTodos = axios
    .then((res) =>;

  return useQuery<Todo[], Error>({
    queryKey: ["todos"],
    queryFn: () => fetchTodos,
    staleTime: 10 * 1000, // 10 seconds