React Router v5
51–60 of 90 posts
Re: React Router v5
#52react-router depends on the ReactTraining/history package for browser navigation support. On 10 June 2017, an mind-bogglingly ill-conceived pull request[1] was merged, which causes invalid URLs to be pushed to the browser history, breaking the back button and page refresh in many scenarios. Ever since, users have practically been begging the maintainer to fix the bug[2] and implementing hacky workarounds[3]. In a twi…
0: https://github.com/ReactTraining/history/pull/465/files#diff...
Re: React Router v5
#53Using react router on one of my personal projects (~ 30k loc) was probably one of my largest regrets. At every turn it seemed designed to do the thing I wouldn’t expect, or have arbitrary restrictions that made my life tougher. Some examples: * there's no relative routes https://github.com/ReactTraining/react-router/issues/2172 * there's no way to refresh the page https://github.com/ReactTraining/react-router/issues/…
I've been managing "relative" routes by just using `match.path` and `match.url` from the previous route. Works fine.
function Parent(props) {
return (
Child
);
}
function Child({match}) {
return (
Grandchild
)
}Re: React Router v5
#54I migrated away from react-router because from v3 to v4 broke everything that made sense. Things became wildly more complicated. I'm now extremely happy with my new router of choice router5 (not to be confused with React Router 5) https://router5.js.org .
How well does router5 work with redux? I see they have an official package for it, so it's looking good, but maybe you have first hand experience.
Re: React Router v5
#55There 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.
Re: React Router v5
#56I 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. F…
I'm assuming that perhaps React Router is preferable beyond a certain amount of complexity? Can anyone chime in where page.js falls short?
Re: React Router v5
#57Re: React Router v5
#58I migrated away from react-router because from v3 to v4 broke everything that made sense. Things became wildly more complicated. I'm now extremely happy with my new router of choice router5 (not to be confused with React Router 5) https://router5.js.org .
Oh, this looks promising. I'm pretty tired of react-router, and I like to keep my navigation in my redux state, as it's a big part of any application state in my mind. How well does router5 work with redux? I see they have an official package for it, so it's looking good, but maybe you have first hand experience.
Re: React Router v5
#59I migrated away from react-router because from v3 to v4 broke everything that made sense. Things became wildly more complicated. I'm now extremely happy with my new router of choice router5 (not to be confused with React Router 5) https://router5.js.org .
Not only is router5's API simple, well-documented and easily programmable, the router5 folks have been receptive to feedback and pull requests. They also keep fairly well up-to-date compared to react-router (router5 supports React hooks, react-router doesn't yet).
I'm content with the direction and design of router5 and encourage others to check it out.