Closed
Description
Is this a bug report?
Yes. AbortController is a new spec (you can find info here: https://developers.google.com/web/updates/2017/09/abortable-fetch)
Have you read the Contributing Guidelines?
Yes
Environment
Environment:
OS: Linux 4.13
Node: 8.9.4
Yarn: 1.3.2
npm: 5.6.0
Watchman: Not Found
Xcode: N/A
Android Studio: Not Found
Packages: (wanted => installed)
react: ^16.0.0 => 16.2.0
react-native: ^0.53.0 => 0.53.0
Steps to Reproduce
- Istantiate an AbortController
- Write a fetch request passing the signal
- Try to abort the fetch request
Expected Behavior
The requested behaviour is to abort the fetch request.
Actual Behavior
Nothing happens
Reproducible Demo
Something like this:
const controller = new AbortController();
const signal = controller.signal;
setTimeout(() => controller.abort(), 5000);
fetch(url, { signal }).then(response => {
return response.text();
}).then(text => {
console.log(text);
});
My question is a technical one: is the react native core that needs to be updated in order to support this? Or is it something that babel can patch with a new version?