loading...

re: Clean Up Async Requests in `useEffect` Hooks VIEW POST

TOP OF THREAD FULL DISCUSSION
re: how does this work with axios?
 

axios has this thing called CancelToken: github.com/axios/axios#cancellation

it is very similar to AbortController 😄

however I would not use axios in the front end though. fetch is very easy to work with - if you want some of the axios' default behaviors (throw on 4xx/5xx, returns data by default) you can easily wrap fetch in your own helper function to do that.

code of conduct - report abuse