Closed amarant closed 4 weeks ago
Hey @amarant, are you asking for this?
import axios from 'axios'
const query = useQuery({
queryKey: ['todos'],
queryFn: ({ signal }) =>
axios.get('/todos', {
// Pass the signal to `axios`
signal,
}),
})
exactly
Say no more ✅
Description
Tanstack query can abort the fetch, but it needs to pass the AbortSignal signal prop to the axios or fetch client.
https://tanstack.com/query/latest/docs/framework/react/guides/query-cancellation#query-cancellation
It would be great to add this functionality.