0

I am making a login page, I want when the person has successfully logged in to redirect them to another page, and I tried to do it with the reaction path but it doesn't work for me, so I would like you to recommend it to me. a library to be able to redirect to another route, if anyone knows any please help me, by the way it is a react project

DansFuture
  • 61
  • 6

2 Answers2

0

You can use the react-router plugin. Here is the link` https://reactrouter.com/web/guides/quick-start

Also npm link https://www.npmjs.com/package/react-router

This is the best routing package for React.js.

Read the documentation, everything is explained in detail there.

0

Are you using a Router Manager? If not and your are working with React for the web, I highly recommend you to use react-router-dom because is an improve of react-router, this package export components ready to use, like or an so on.

I leave you this link where this topic in react-router-vs-react-router-dom

And off course, the package documentation/github: react-router-dom-github

I hope I have been helpful.