Grokking React Native
Vote

0% completed

​

Getting Started with React Query

Calling useQuery in a new project, with nothing else in place, stops the app with this error:

No QueryClient set, use QueryClientProvider to set one

That message describes the whole setup. React Query needs one object that holds the cache, and it needs a way for every component to reach that object. Installing the package and adding those two things takes only a few lines, and after that any screen can use useQuery.

Installing the Package

React Query is written entirely in JavaScript and has no native code, so a plain npm install is enough

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content