All posts

React Query internal operating principles 1 - The secret of selective re-rendering

, 6 min, react-query

A source-level look at how React Query uses Proxy tracking to re-render only accessed fields across the Query, Observer, and Component data flow.

On this page4
  1. @tanstack/react-query flow
  2. How to notice changes in data?
  3. Obviously, there are many states such as isLoading, data, isError, etc., so why re-render only the values ​​I use?
  4. Attribute tracking using trackResult and Proxy