Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

axios cancel request

import axios from 'axios'

const query = useQuery(['todos'], ({ signal }) =>
  axios.get('/todos', {
    // Pass the signal to `axios`
    signal,
  })
)
Source by tanstack.com #
 
PREVIOUS NEXT
Tagged: #axios #cancel #request
ADD COMMENT
Topic
Name
9+8 =