response.js icon indicating copy to clipboard operation
response.js copied to clipboard

Export conflicts with fetch Response

Open ryanve opened this issue 8 years ago • 3 comments

Response is the name used in our root export but the native fetch API adds window.Response as part of that standard. What is the best way to mitigate conflict with this? Rename the export? Ideas? How should we communicate this change?

ryanve avatar Dec 31 '17 20:12 ryanve

Hi @ryanve I am also getting this issue. Response.js Response object getting conflicts with fetch Response.

amanssit avatar Jul 26 '19 10:07 amanssit

Ok I'll have to do a new version with a new export name. I'll post here when I do!

ryanve avatar Aug 08 '19 01:08 ryanve

noConflict restores the fetch Response and returns a reference to the library

let R = Response.noConflict() 

See noConflict in the source to see how it works : )

@amanssit how does that work for you for now?

ryanve avatar Aug 08 '19 23:08 ryanve