A router component is a wrapper around our application. The router component is responsible for keeping a history of the routes, so that you can "Go back" to the previous screen. There are two router components – <BrowserRouter> and <HashRouter>. <HashRouter> is purely used for serving static files; therefore, we'll use the <BrowserRouter> component.
In src/index.jsx, wrap our root component (currently <RegistrationForm />) with our BrowserRouter component:
import React from 'react';
import ReactDOM from 'react-dom';
import { BrowserRouter } from 'react-router-dom';
import RegistrationForm from './components/registration-form/index.jsx';
ReactDOM.render((
<BrowserRouter>
<RegistrationForm />
</BrowserRouter>
), document.getElementById('renderTarget'));