Cancel all axios requests in React’s componentWillUnmount Lifecycle.

How to Cancel Requests where the Axios request is inside the component.

Both the axios request and cancel request happens is handled inside this component

How to cancel requests where the axios requests are extracted out to different files/folders.

Handles requests to different API's.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store