Error No QueryClient set error on useMutation Custom Hook
I have a QueryClientProvider wrapping the whole application at the root and parts of the app that use custom useQuery hooks are working fine.
When I go to a page in the app that a custom useMutation hook the page does not render and I get this error in the console log.
Not sure what I can do to get around this error. any suggestions?
1 Reply
other-emeraldOP•4y ago
finally found the solution to this issue and it was a total pebcak issue.
I was still importing from 'react-query' and not '@tanstack/react-query' as I had copied the code from a former working code block that was still on v3.x.