State Management · Junior · Question 41 of 75

What's needed before calling useQuery in an app?

Explanation

The QueryClient holds the cache and defaults. Create it once (outside the component or in useState) so the cache isn't reset on every render. Redux isn't required.

Further reading

Problem with a question

State Management · Junior · question 41

Test yourself

Take the State Management · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz