React · Middle · Question 38 of 75
What is RTK Query?
- ✓Correct answer: Data fetching and caching in RTK:
createApigenerates hooks - 2A query language for the Redux store, similar to SQL syntax
- 3A GraphQL server plugin that generates a schema from the store
Explanation
createApi describes endpoints, and the library generates hooks like useGetPostsQuery and manages caching, deduplication, refetching and tag-based invalidation. It solves the same problems as TanStack Query but is built into the Redux infrastructure. It works with GraphQL too, but it isn't a server plugin.