3 ms·
I had nothing but trouble whenever I used React Router. For example, sometimes paths would be appended to the URL instead of replacing it, making it grow indefi
by steve_taylor 8y ago
I had nothing but trouble whenever I used React Router. For example, sometimes paths would be appended to the URL instead of replacing it, making it grow indefinitely, and it wasn't obvious why.
There were two API rewrites in a short space of time and it was extremely frustrating, especially since it seemed almost compulsory to be experienced with React Router (along with Redux) to be taken seriously by recruiters.
For my own projects, I started using page.js years ago and haven't looked back.
https://github.com/visionmedia/page.js https://github.com/visionmedia/page.js
- mercer 8y agoSame here. I've had trouble with every version of React Router that I've used, and page.js seemed to always do pretty much exactly what I wanted. I'm assuming that perhaps React Router is preferable beyond a certain amount of complexity? Can anyone chime in where page.js falls short?
- stackola 8y ago>sometimes paths would be appended to the URL instead of replacing it, making it grow indefinitely Do you have a publicPath in your webpack.conf? `publicPath: "/"` Also make sure you a linking to="/path", not to="path"