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
refreshing access token manually in axios
``
const res = await axios.get(
https://us-east-1.aws.data.mongodb-api.com/app/${process.env.REACT_APP_APP_ID}/endpoint/taskLogs`,
{...Is there a way to monitor queries from a parent component?
Does react-query work with react-native-windows ?
What is the best way to prevent a function running after its fetched and not loaded.
Deleting Cached Data Programmatically in RTK Query after Mutation
invalidatesTags
doesn't work for me because it triggers a refetch of the data. However, the data in my application already has validations/checkers set, and I cannot afford to refresh or lose these states....
Any guidance / examples on react-query + handling live websocket events?
Is it possible to skip cache for a hook?
"cache-policy: 'network-only'"
that I think existed in the days of apollo
Is this possible to achieve with react-query?
My case is the following. I have basically a stateful fetcher function that I'm passing to the component. When the component mounts, I want it to always invoke that function so that it gets the new data. And I don't want it to show the data from the previous computation. I cannot pass a unique value to queryKey
because the function has no arguments....Framework independent usage
best practices for conditional fetching with React Query?
Does refetch internally call fetch
refetch
simply calls fetch
. I was wondering if refetch
requires that the initial query has been fetched
previously or if as long as a query is defined we can call refetch
as the initial query call? (I think this is true?)useMutation invalidateQueries does not trigger either on onSuccess or onSettled
queryFn won't refetch with new state (it sort of does but not the way i expected)
setRowsPerPage
in the handleChangeRowsPerPage
function works correctly when i select 25 or any other value from the dropdown in the table pagination UI and i can see the console log of the updated state
...fetchInfiniteQuery doesn’t allow page params
Query refetches when page is refreshed even if refetchOnMount is false.
keepPreviousData: true
in my old project but I gues it is deprecated....
How to invalidate a query key for all opened pages?
queryClient.invalidateQueries(key)
and it invalidates well for the current page window, but I would like it to invalidate all window pages currently open. How to do that?How does React Query trigger a render?
useMutation onSuccess trying to add new row of data to UI, not working
useMutation
. Everything is working correctly on the backend. Now on the front, I want to reflect the new ingredient that was just added in the table. I read on their site that the usual practice is passing back the newly added entry after adding something, so no extra network calls needed. I am passing the new ingredient back and I can see it in the data
. But the ingredients table is not updating. I don't understand react-query enough to understand what variables
is or where it is coming from. But I'm thinking one issue or maybe the issue is that the id
in variables is blank.
Here is my useMutation
code:
```js
const { mutateAsync: insertIngredientMutation, isLoading } = useMutation({
mutationFn: insertIngredient,...QueryObserver with partial key