Query key
The array that names a query's data in the TanStack Query cache. Every input of the request belongs in it, so different inputs never share an entry, and a shared prefix such as ["orders"] lets one invalidation refresh a group of queries.
Minimal example
queryKey: ["restaurants", near.lat, near.lng, near.radiusKm]Learn this concept
Lesson 4.8 · TanStack Query cachingUsed in exercises
Exercise 4.10 · Restaurant list screen Exercise 4.11 · Restaurant menu screen Exercise 4.15 · Item configurator screen Exercise 4.17 · Orders tab and order detail screens Exercise 4.22 · Restaurant search utilitiesPrerequisite conceptsTanStack Query