TLDR Web Dev · ARTICLES & TUTORIALS

REACT QUERY SELECTORS, SUPERCHARGED

tkdodo.eu6 min read

Summary from the TLDR Web Dev newsletter

The `select` option in React Query allows for fine-grained subscriptions to specific parts of data fetched from an API. Using `select` prevents unnecessary re-renders by subscribing components only to the data they need, improving performance. For computationally expensive `select` functions, `useCallback` should be used for stable references and libraries like `fast-memoize` for memoization.