3 ms·
it would be nice if React.Component had a cancel method, so you could simply drop all your promises into it and they get canceled when the component unmounts.
by k__ 9y ago
it would be nice if React.Component had a cancel method, so you could simply drop all your promises into it and they get canceled when the component unmounts.
this.cancelOnUnmoun(new Promise(...)).then(...)