State Management · Senior · Question 22 of 75
What is structural sharing in TanStack Query?
- ✓Correct answer: Unchanged parts of a refetched response keep their old references
- 2One cache is shared between browser tabs
- 3Responses of all queries are stored in one normalized table
Explanation
The new JSON is deep-compared with the old one and equal subtrees reuse references, so memo components and effect dependencies don't react to identical data. It can be disabled for huge non-JSON data.