react-query-questions
solid-query-questions
table-questions
virtual-questions
router-questions
react-charts-questions
ranger-questions
vue-query-questions
svelte-query-questions
bling-questions
form-questions
angular-query-questions
start-questions
db-questions
start-showcase
router-showcase
📣-announcements
Infinite query with maxPages scrolling
Tanstack Query + useRouter (Next Navigation)

Invalidate query functionality
Debugging tips for missing response with msw mocks
How to handle a function dependency of the query/mutation function?
Tanstack useInfiniteQuery hooks missing last page and hasNextPage return false
useQuery don't not call under async method
useQueries question
useQueries
to combine queries that I have already defined custom hooks for. It seems that I can get away with only specifying queryKey
in the queries
array of useQueries
. The function seems to map the queryFn
already defined for each queryKey
. However the documentation for useQueries
is a bit sparse so Im unsure if this is an acceptable pattern. Should I instead redefine the function for each entry in queries
?...Query reload QueryFn problem
Enabled prop
queryFn: () => fetchLiveMemePrice(slerf?.price!, raydiumPoolAddress!),
enabled: !!slerf?.price && !!raydiumPoolAddress,
queryFn: () => fetchLiveMemePrice(slerf?.price!, raydiumPoolAddress!),
enabled: !!slerf?.price && !!raydiumPoolAddress,
Testing react query with Suspense and react testing library
queryClient.getQueryData returns undefined when page refresh
const queryClient = new QueryClient();
const articleStories = queryClient.getQueryData(['home-data']);
React query version is ^4.29.7...I have the ID in the function, but I can't call useQuery inside a function? What is the correct way

How do you handle undefined or missing useQuery results with Typescript?
`await queryClient.refetchQueries` resolves too early
Global error handling & Localization
QueryClient
is created "outside" of react for stability (currently I'm using useState to persist it on potential re-renders), my normal approach of using my useTranslations
hook for translations is not viable without re-creating the QueryClient
. ...Alter error object returned from queries
useErrorMessage
(see attached image) for handling this.
I'm wondering if it is possible to configure the QueryClient in a way so that all my queries are automatically returning a new property like, I18nErrorMessage
, that is the result of running my custom hook?...
Refetch after invalidate doesn't respect the enabled false
Make an offline app
asyncStoragePersister
, to save the data in a safe and sustainable way....typescript type when I pass an onSuccess callback to my custom hook