How to handle Authentication with react-router?
问题 Trying to make certain routes require Authentication. I have this: class App extends Component { render() { const menuClass = `${this.props.contentMenuClass} col-xs-12 col-md-9`; return ( <BrowserRouter history={browserHistory}> <div className="App"> <Header properties={this.props} /> <div className="container-fluid"> <div className="row"> <SideNav /> <div className={menuClass} id="mainContent"> <Switch> {routes.map(prop => ( <Route path={prop.path} component={prop.component} key={prop.id}