Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/src/pages/guides/query-cancellation.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ But don't worry! If your queries are high-bandwidth or potentially very expensiv
## Using `axios`

```js
import { CancelToken } from 'axios'
import axios from 'axios'

const query = useQuery('todos', () => {
// Create a new CancelToken source for this request
const CancelToken = axios.CancelToken
const source = CancelToken.source()

const promise = axios.get('/todos', {
Expand Down