Normally, we use react-router-dom library in order to navigate to each page.
The usage is normally just like following and it is the same as what created by create-react-app.
history.js file
import * as history from 'history';
export default history.createBrowserHistory();
index.js file
import {Router} from 'react-router-dom';
import history from '../history';
<Router history={history}></Router>
But I don't understand why history is necessary for the Router.
Is there anyone who can lend a hand to make me understand?