Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

react
router
javascript
web
spa

What is a React router?

Educative Answers Team

Routing

Is the process of resource navigation in a web app. This is how your app determines what to do with a client request. For example:

app.get('/', function (req, res) { res.send('Hello World!'); })

When an HTTP GET request is made to the homepage of this web app, it returns “Hello World!”.

React router

A tool that allows you to handle routes in a web app, using dynamic routing. Dynamic routing takes place as the app is rendering on your machine, unlike the old routing architecture where the routing is handled in a configuration outside of a running app. React router implements a component-based approach to routing. It provides different routing components according to the needs of the application and platform. The following illustration shows how react router’s dynamic routing works as compared to traditional static routing: