Interesting react router problem REACT JS | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Interesting react router problem REACT JS

I have a react app that contains 2 js files and uses react router. Everything was fine, but when I added react router (like importing the components and the routes) the app had a significant amount of load time and eventually didn’t load at all. My CPU and RAM were also extensively used when I added the routing. Then I removed the router and everything worked perfectly. I also tried removing the JS files and nothing happened, so the problem is obviously the react router. Please help me solve this.

8th May 2021, 9:43 PM
Coder
Coder - avatar
2 Answers
0
My laptop has 4gb of ram btw. Also, I don’t remember where I installed react router, but I think it was in the same folder where my react app was, I didn’t install it globally (I think). Maybe this is the problem?
8th May 2021, 9:44 PM
Coder
Coder - avatar
0
Hii maam
26th Jul 2022, 9:16 AM
Aryan Maurya Mr.perfect
Aryan Maurya Mr.perfect - avatar