Back to Browse

Cancelling a Fetch request in a useEffect hook

8.0K views
Feb 26, 2019
11:20

We've previously seen how to cancel an Axios request when the useEffect hook cleanup function gets called, but in this video we'll convert Axios over to use Fetch and see how we can cancel the Fetch request using an AbortController. Code examples can be found here - https://github.com/leighhalliday/use-effect-example Art by Mark Kirkpatrick - https://www.artstation.com/visualhuman

Download

1 formats

Video Formats

360pmp417.7 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

Cancelling a Fetch request in a useEffect hook | NatokHD