I'm currently developing a react native application and I intend to use AbortController to cancel requests when necessary. The way I'm doing this is basically the simplest example available in the MDN docs, which is basically this:
const controller = new window.AbortController()
const signal = controller.signal
fetch(url, {signal})
However, for some reason, the creation of the controller object is not working properly, and if I console.log that object, I can see that it's being created as an empty object ({}).
But it gets weirder. If I use the Debug tool in react native dev tools, the controller object gets created as expected.
Any idea what might be the issue here?