Client-Side Fetching with React-Query

Hi guys! so I have an external api that I needed to consume on the client-side. I assume that I don't need to setup anything since trpc already included react-query as a dependency so what I did was just imported useQuery from @tanstack/react-query and use:

const { data, isLoading } = useQuery({
    queryKey: ["data"],
    queryFn: queryFunction,
  });



But I constantly see undefined as a result to the data, and Can't even see the request being sent in the network tab. Am I missing something? Thank you!
Was this page helpful?