State Management · Middle · Question 37 of 75
How does RTK Query avoid duplicate requests when 3 components call useGetUserQuery(1)?
- ✓Correct answer: Requests with the same endpoint and argument are deduplicated into one
- 2It sends three requests and keeps the fastest response
- 3Only the first component gets data; others get
undefined
Explanation
The cache key is endpoint + serialized argument. All subscribers share one request and one cache entry, which also stays alive while any of them is mounted.