Back to programming Quizzes

React Query Quiz ( Intermediate )

This medium-level React Query quiz is designed for developers who already know the basics and want to master caching strategies, background updates, query invalidation, and real-world data-fetching patterns. Ideal for interviews and production React applications using TanStack Query.

15
Questions
~10
Minutes
10
Min Limit

Try a few sample questions

The question bank contains 39 questions. Your scored round uses up to 15 different questions. These samples are excluded from your round; try each one before opening its answer and explanation.

1. Why is React Query considered different from Redux for data handling?

  1. It manages server state instead of client state
  2. It replaces reducers
  3. It stores data permanently
  4. It avoids async code
Reveal sample answer and explanation

Answer: It manages server state instead of client state

React Query focuses on server-state, not client UI state.

2. What happens when a query key changes?

  1. Cache is ignored
  2. A new query is created and fetched
  3. Old cache is deleted
  4. Query stops permanently
Reveal sample answer and explanation

Answer: A new query is created and fetched

A changed query key triggers a new cache entry and fetch.

3. Why should query keys be stable?

  1. To reduce memory usage
  2. To prevent duplicate caches
  3. To improve styling
  4. To enable mutations
Reveal sample answer and explanation

Answer: To prevent duplicate caches

Stable keys prevent unnecessary refetches and cache duplication.