adrianhajdin / project_e_commerce

This is a code repository for the corresponding video tutorial. In this video, we're going to build a fully functional eCommerce application using commerce.js.

Home Page:https://jsmastery.pro

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Update Switch (React-router-Dom)

gladosn07 opened this issue · comments

React router dom has been updated, replace switch as Routes

I am having this same issue as I have react-router-dom version 6.2.2 installed.. Are you able to paste your version of App.js to show the changes you had to make from Switch to make this work. I tried just changing Switch to Routes, but that wasn't enough to make this work.

Ended up changing the package.json file to "react-router-dom": "^5.2.3" and running npm install again instead of using version 6. This resolved my issue. I am now still using switch.