Hacker News new | ask | show | jobs
by fyfy18 2478 days ago
Any suggestions for an alternative to react-router?
4 comments

These replies to this question say it all for me. Routing should not be some library research task for the developer. How do I have time to review these packages and all of their million dependencies for security issues or just bad design.

No one does, they just throw it in production and hope whatever way they figure out how to get the thing they need done at that moment doesn't burn them later.

I would have said reach-router, as it seems fairly well thought through, is constrained, and was originally an attempt to correct deficiencies in react-router. But it's being merged into the next version of RR.

What anm89 says is on point. All solutions available are awful in their own special ways. If a router solution _is_ needed, and there's no chance you can't just rely on the browser history API, imo stick with RR despite it's major downsides, because at least there is the major benefit of vast community support; all solutions seem fairly shit otherwise (just cross your fingers you don't need to do any React Native work that needs a routing/navigation library cos hoo boy it's a shitshow)

Did you tried Router5( https://router5.js.org/ )

They have a react version. I experimented with it in one of the small projects i worked on. My experience was positive.

Most importantly, it's API is simple and easy to use.

My current favorite is Navi.

https://github.com/frontarm/navi