DEV Community

Cover image for Uncaught Error: No QueryClient set, use QueryClientProvider to set one
CatWebDev
CatWebDev

Posted on

Uncaught Error: No QueryClient set, use QueryClientProvider to set one

Hello and welcome!

If you encounter an error while using @tanstack/react-query in your React Vite project, there's no need to panic.
Check your imports related to React Query.

You might be using:

import { useQuery } from 'react-query';
Enter fullscreen mode Exit fullscreen mode

Instead of:

import { useQuery } from '@tanstack/react-query';
Enter fullscreen mode Exit fullscreen mode

YouTube @catwebdev

Thank you for reading.
See you in the next one!

Top comments (0)