Aditya yadav
Aditya yadav

Reputation: 119

unble to get property "includes" of undefined or null reference

I have build my application in Reactjs and I tried to open the application on Microsoft Edge browser. I am getting the below error, unable to get property "includes" of undefined or null reference.

Unable to load the page

Upvotes: 0

Views: 1248

Answers (1)

Zhi Lv
Zhi Lv

Reputation: 21381

I installed one npm package, npmjs.com/package/react-app-polyfill. With the help of this I am able to run my app on edge but it still not working on IE 11

Please refer to the following steps to make the react application works well on IE 11 browser.

  1. Install the package using Yarn or npm: (since, you have already installed this package, please ignore this step)

    npm install react-app-polyfill
    

    or

    yarn add react-app-polyfill
    
  2. Add the following code on the first line in 'src/index.js'.

    import 'react-app-polyfill/ie11';
    import 'react-app-polyfill/stable'; 
    
  3. Add ie 11 in 'packge.json' like this:

    enter image description here

  4. Restart the app and it will work in IE11.

Upvotes: 2

Related Questions