Kicking it in Dayton, Ohio as a software engineer with a passion for learning and teaching #a11y. Other passions include frontend web dev, drawing, running, and anime.
@alessia
This was great that you asked this question, because I was able to find some errors in my personal website that need fixing. So I went through and was wondering why I wasn't having the problem with react-router specifically, and it's because when I followed the quick-start guide for web on the react-router docs, it actually has you have react-router-dom.
So when I switched the imports to import from react-router there were problems, likely mine had more to do with the with switching, but the update between pages should work if you update to importing from react-router-dom, I've also successfully used it with @reach/router.
Here is an example repo of where I'm using it with react-router-dom
I hope this kind of helps for now, I'll need to build a new test project to really dig in deeper.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
@alessia This was great that you asked this question, because I was able to find some errors in my personal website that need fixing. So I went through and was wondering why I wasn't having the problem with react-router specifically, and it's because when I followed the quick-start guide for web on the react-router docs, it actually has you have
react-router-dom
.So when I switched the imports to import from
react-router
there were problems, likely mine had more to do with the with switching, but the update between pages should work if you update to importing fromreact-router-dom
, I've also successfully used it with@reach/router
.Here is an example repo of where I'm using it with
react-router-dom
I hope this kind of helps for now, I'll need to build a new test project to really dig in deeper.