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
invalidateQueries / setQueryData post mutation not triggering the rerender of all consumers
initialData vs hydrate/rehydrate
useQueries understanding which query's response updated?
Google Sheets API request in NextJS App router
useQuery returning previous user data after logout, then login
hi friends, please help me with this
Invalidating useSuspenseQuery after mutation
Streaming with Remix
Data is still undefined even after declaring isPending and isError in React Query V5
isPending
and isError
has changed.
Previously, I was able to define them as guard clauses and data
would always be defined afterwards:
```
typescript
// React Query v4...Enable doesn't work with NextJS14 in tanstack/react-query v5.28.4
Many children subscribers vs passing from parent
useQuery
Is it better to do this
```ts...Is it intended for useQuery to read latest data when `enabled: false`?
useQuery
calls that read w/e data is in the query cache without fetching.
One useQuery
call could initiate the fetch while other useQuery
calls (with the same query key) read w/e data (regardless if it's stale) from the query cache. For all the other useQuery
calls, is it okay for them to have enabled: false
?
Lmk if a code example would make this more clear. ty...useSuspenseQuery returns last error instead of fresh data

clear persisted cache from sessionStorage
useQuery handle logout for 401 errors in global callback
Is it expected that queries with a `gcTime` set aren't used by `react-query-persist-client?
Is there a way to manually set the entire cache to a new value?
queryKey
to setQueryData()
. I've written a recursive function that gets the entire cache and updates every occurance of the value and returns a new array. How can I set the cache to this new array?
(If there is a better way of doing what I'm doing I'm open to suggestions)
Thanks...Querying an API for a Details screen without a "details" endpoint
useQuery
hook and call the API's list endpoint and populate the screen with an entry for each Foo. Each entry is clickable, and clicking will open the Details screen (passing in a unique Foo ID). However, that is where the data stops.
The Details screen has no way direct way to get the Details of a Foo, as there is no API endpoint for it. The best option I see is to use useQuery
again, and hope it hits the cache from the List screen (the list endpoint includes all the details), instead of sending out a new request. That still feels like bad data practice, though. A second option would be to use QueryClient.setQueryData
to set each individual cache for each Foo
, but I feel like that may also be frowned upon from a "best practices" perspective (setting the query data outside the normal way, fetching).
What should I do in this scenario?...Using custom hooks in loader function
What is the recommended way to trigger a GET just once on button press?