Run React App in Internet Explorer

Sometimes, We make any react app, and it working fine for everyone but sometimes some persons still use IE(Internet Explorer). Then our application doesn’t work for IE. There is a way for solving this problem.

There are some basic steps for the full understanding of this problem:-

Step 1:- Create react app

I have already written an article on this step you can go to it through this link. https://rajputankit22.medium.com/create-react-app-86649e75e350

Step 2:- Run the app on IE

Run the app on Internet Explorer then it won’t work. You can see on the screenshot. It will give syntax related errors.

Project Run on IE

Step 3:- Install react-app-polyfill

Install react-app-polyfill module through the following command.

$ npm i --save react-app-polyfill

step 4:- Edit Index.js

Import two modules on top of the root’s index.js file. Which are given below.

import "react-app-polyfill/ie11";
import "react-app-polyfill/stable";
Import Modules

Step 5:- Edit package.json

Add another browser to the browser list.

Browsers List

Step 6:- Delete cache folder

Now, You will have to delete .cache folder from node_modules folder.

Delete cache

Step 7:- Restart the app

Now, Restart the app then you will see that the application is perfectly running on IE. You can see in the screenshot.

Project Run on IE

That’s it for this time! I hope you enjoyed this post. As always, I welcome questions, notes, comments and requests for posts on topics you’d like to read. See you next time! Happy Coding !!!!!

--

--

Ankit Kumar Rajpoot

I’m a MERN Developer. ( Redux | AWS | Python ) I enjoy taking on new things, building skills, and sharing what I’ve learned.