shukerullah / react-geocode

A React module to transform a description of a location (i.e. street address, town name, etc.) into geographic coordinates (i.e. latitude and longitude) and vice versa.
MIT License
207 stars 33 forks source link

Fetch isn't supported in IE #35

Closed rosman21 closed 4 years ago

rosman21 commented 4 years ago

Getting an error when using it with IE saying fetch is undefined. I looked at the lib folder index.js looks like you are using fetch in a couple of places. Do you have a workaround for this?

rosman21 commented 4 years ago

Might be overkill but I fixed it by importing these items in my index file in my react project

import 'react-app-polyfill/ie11';
import 'react-app-polyfill/stable';
import 'babel-polyfill';
import 'core-js/stable';
import 'regenerator-runtime/runtime';
require('es6-promise/auto');