TanStack Query
15 rules in fabricahq/public-library
Define hierarchical query keys and options in factories
MEDIUMfabricahq/public-libraryDerive component views of query data with a stable select
LOW-MEDIUMfabricahq/public-libraryDerive infinite query page params from the server's response
MEDIUMfabricahq/public-libraryFetch a dynamic set of queries with useQueries
MEDIUMfabricahq/public-libraryInvalidate or update every query a mutation changes
HIGHfabricahq/public-libraryKey each query by every input it uses
HIGHfabricahq/public-libraryMake offline behavior explicit
LOW-MEDIUMfabricahq/public-libraryMake optimistic updates reversible, and decide them once
MEDIUM-HIGHfabricahq/public-libraryPass the query's AbortSignal to the request
MEDIUMfabricahq/public-libraryPrefetch likely next data on user intent
MEDIUMfabricahq/public-libraryPrefetch on the server and hydrate the query cache
MEDIUM-HIGHfabricahq/public-libraryRead mutation state from other components with useMutationState
LOW-MEDIUMfabricahq/public-libraryReset query errors when an error boundary retries
HIGHfabricahq/public-librarySet staleTime from how fast data changes
MEDIUMfabricahq/public-libraryUse initialData only for complete data
MEDIUMfabricahq/public-library