BrowserRouter code example
Example 1: react router switch
ReactDOM.render((
<Switch>
<Route exact path="/" component={Home} />
<Route path="/login" component={Login} />
<Route path="/explore" component={Explore} />
</Switch>),
document.getElementById('root')
);
Example 2: browserrouter
<BrowserRouter
basename={optionalString}
forceRefresh={optionalBool}
getUserConfirmation={optionalFunc}
keyLength={optionalNumber}
>
<App />
</BrowserRouter>