Skip to content Skip to sidebar Skip to footer

Reactjs With Fetch On Older Browsers

I am implementing React JS, with Webpack and Babel. However, I am having trouble getting Fetch to work with IE 11. I have the following in my .babelrc file: { 'presets' : ['env'

Solution 1:

fetch isn't part of EcmaScript but its part of the web platform. Babel is only a compiler to write the latest Javascript. If you want to use fetch in older browsers you need a polyfill like this one

Fetch API: read more

Solution 2:

fetch must be made available by the browser you use and is not included in babel-polyfill. If your browser doesn't support fetch, you can either fall back to using XMLHttpRequest or use a polyfill such as isomorphic-fetch.

Post a Comment for "Reactjs With Fetch On Older Browsers"