React 18 intermediate no overload matches this call

has anyone else been getting the ‘no overload matches this call’ a couple of times?
when I follow Mosh’s code (or even copy it from the repository) I get these errors here and there and have to modify the code to make it work. (I am running the same versions of everything)

const useTodos = () => {
  return useQuery<Todo[], Error>({
    queryKey: CACH_KEY_TODOS, //here I am getting this error
    queryFn: apiClient.getAll,
    staleTime: 10 * 1000, //10s
  });
};
1 Like

return (
return (


    {posts.map((post) => ( // error Property ‘map’ does not exist on type ‘TQueryFnData’.ts(2339)

  • {post.title}

  • ))}

);
};

this is my second error and first one is your error