iamshaunjp / React-Firebase

All course files for the Net Ninja React & Firebase course.
493 stars 494 forks source link

react-router-dom version issue #1

Closed azhar-codeprism closed 3 years ago

azhar-codeprism commented 3 years ago

In lesson 71, the router version which gets installed when installing with command npm install react-router-dom is version 6 which is a bit different from react-router 5 that's used in this course. One problem caused by this is that Switch is not supported in the newer version as a result there is an error

azhar-codeprism commented 3 years ago

Solution (How i solved it) : The issue can be solved by using command npm install react-router-dom@5.2.0. If you have already installed the v6 package then go to your package.json file and under dependencies, set the version of react-router-dom to 5.2.0 and then hit npm install in your terminal.