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
UseQuery not triggering a rerender
setQueryData and getQueryData
React query data lost after running 'navigate(...)'
navigate(...); and then all querydata is lost/missing. I can see in the 'ReactQueryDevtools', that there is no data, it is completely blank. What am I doing wrong here?...Updates from a mutation in combination with a slow server
How can I use ensureQueryData in a component? - Help please 😂
ensureQueryData like this in a custom hook:
```ts
export const useInitialDataEnsureQueryData = () => {
const [initialData, setInitialData] =
useState<FetchInitialData.Return | null>(null)...Tracking ongoing refetch attempts in useQueries' refetchInterval
useQueries's refetchInterval that refetches a query up to three times based on certain conditions.
```typescript...Mutation throttling
Issue with migrating from v3 to v5 related to mutations
mutateAsync method returned by useMutation . Once a response is returned from it, we do some computation, and then redirect to a different route on our page using history.push where history is provided using useHistory.
Issue - This was working fine in v3. However, in v5, some additional re-renders are happening. This is causing some invalid page state to come up, which ends up causing the app to crash. Earlier, when execution reached the redirection point, it would immediately redirect to that route without delay. Now, that is not happening....Can I log errors from queries & mutations without throwing them? (struggling with error handling)
throwOnError to true to have the errors thrown, but I've already built my app to use the error states from my queries/mutations and would rather not have to rebuild all of that. I can set a default onError function for mutations, but that doesn't exist for queries, and even then I'd need to re-implement that for any mutation that needed its own onError handler. I also tried to get fanc...How to Delay Queries Until Access Token is Available in TanStack Query?
What would be the correct way to type queryKey if input is a skipToken?
Does refetch() not invalidate the query?
useThings which returns array of things and it's wrapped in useMemo
I have refetch in some other component and expect this to trigger change in here but id does not update the map values.```...
How to deserialize dates with createAsyncStoragePersister?
dayjs objects are stored in the cache, and when I reload the page, it breaks because those objects are returned as strings. I have been researching and found that createAsyncStoragePersister has serialize and deserialize properties to customize this. I also saw that using a library like superjson is recommended to achieve this.
However, I haven’t found any code examples showing how to implement it. Any ideas? I would appreciate a small code example on how to implement this in createAsyncStoragePersister.
This is my persister...Understanding Query Key Objects
Migrate from apollo graph ql query to tanstack react query
Question about ensureQueryData
Prefetching on the server correct approach
sponsors which should not change or change rarely only during next builds.
2. I render a component that uses useQuery and I want it to always have the data so no loading state's -> use what was prefetched on the server. Component is deep down so I don't want to pass initial data.
3. Sponsors is the same across all user requests....Working with providers?!
Check if queries with common query key are fetching
queryKey: ['projects', orderBy, page]). Is there any way to check and re-render if at least one query for a specific page is currently fetching? Like is "projects ordered by date" currenty (re-)fetching, no matter which page? Somehow similiar to useMutationState, but for queries?...