Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there another way of routing in React-JS/React-TS beyonds the library react-router-dom@latest? [closed]

I'm working on a frontend project.

I need to set the net of routes.

I've found that there the react-router-dom@latest.

I'd like to know if there's another option.

Because, JS a opensouce.

So I thought someone else could've created another to route.

like image 820
Lázaro Damasceno Avatar asked Dec 21 '25 09:12

Lázaro Damasceno


2 Answers

I strongly urge you to go with the react-router-dom. but, still as far as I know, You can go with these 2 alternatives:

=> Reach Router:

Reach Router: Reach Router is a routing library that mainly focuses on accessibility. Reach Router aims to provide a simpler and more predictable routing experience but still in the experimental phase.

Here are the few links you can explore:

  1. Official Documentation: https://reach.tech/router/

  2. https://github.com/reach/router/tree/d2c9ad06715c9d48c2d16f55f7cd889b626d2521/website/src/markdown

  3. https://www.npmjs.com/package/@reach/router

=> Second alternative is you can start using Next.js which is built on top of ReactJS and includes built-in routing capabilities. It provides an easy-to-use file-based routing system, where each page is represented by a React component.

like image 184
Maulik Bhalani Avatar answered Dec 23 '25 23:12

Maulik Bhalani


React-router-dom was recommended officially by React JS which why it is the most commonly used package. You can explore more packages at https://www.npmjs.com/search?q=keywords:routing. For example there is a package called react-easy-router which is being used by many people too. So I guess there is no limitation on the routing packages for React, and there is no guarantee that react-router-dom is the easiest package out there. There might be more simpler packages too, its just that people are more comfortable using it.

like image 34
Muhammad Ali Zaib Avatar answered Dec 24 '25 00:12

Muhammad Ali Zaib



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!