In the following React app w/ two routes the URL http://myapp routes properly to the Layout component. However, the URL http://myapp/login also routes to the Layout component rather than Login. If I change the path="/login" to "/signin" it routes properly to the Login component.
Is there something special about the "/login" path in React Router that routes it to the route? Or is there an error in the way I've setup this routing?
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import { AppContainer } from 'react-hot-loader';
import { BrowserRouter, Switch, Route } from 'react-router-dom';
import { Layout } from './components/Layout';
import { NotFound } from './components/NotFound';
import { Login } from './components/Login';
//Redux store
import { Provider } from "react-redux";
import store from "./store";
function renderApp() {
ReactDOM.render(
<Provider store={store}>
<BrowserRouter basename="/">
<Switch>
<Route exact path="/" component={Layout} />
<Route exact path="/login" component={Login} />
<Route component={NotFound} />
</Switch>
</BrowserRouter>
</Provider>,
document.getElementById('react-app')
);
}
renderApp();