Closed tabishmazhar closed 2 years ago
In your client folder run this in the terminal
npm i react-router-dom@5.2
Hi, Support!
Thanks for detailed tutorial!
But...
Please, keep the training article and examples up to date and update the dependencies. If you do everything according to the article - your example does not work today - Router requires a wrapper
Hi @tabishmazhar and @ZarNizza ,
Thanks for reporting this. I will work on updating the code and migrating it to the newest version.
Meanwhile, I will fix the version of react-router-dom
to 5.2.1 as a temporary workaround.
Regards, Pash
PR #15 fixed this issue
Hi, getting this issue:
./src/components/edit.js Attempted import error: 'withRouter' is not exported from 'react-router'.
I noticed package.json on a new project does not contain the following line: "react-router-dom": "^5.2.0", I guess this means if you follow instructions as per the blog: https://www.mongodb.com/languages/mern-stack-tutorial it does not uses the latest version.
I therefore made the code exactly like code files on Github but still getting this issue, please advise.