DEV Community

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

Posted on

1 1 1 1

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)

Cloudinary image

Optimize, customize, deliver, manage and analyze your images.

Remove background in all your web images at the same time, use outpainting to expand images with matching content, remove objects via open-set object detection and fill, recolor, crop, resize... Discover these and hundreds more ways to manage your web images and videos on a scale.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay