I'll add an alternative library qwest
Qwest is a simple ajax library based on promises, and that supports XmlHttpRequest2 special data like ArrayBuffer, Blob, and FormData.
qwest.get(this.props.url)
.then(function(xhr, response) {
// perform setState here
});
The reason why I'm listing it here is that it supports cancellation via
const request = qwest.get( /*... */ ).then( /* won't execute */ )
request.abort();
When components unmount/unload, call abort() to avoid React spamming the console when Ajax Promises resolve after the component has unmounted/unloaded from the DOM.