I would like to ask how to define the nested route of react-router 4. My definition is wrong. The switch, contained in the div will not be located, resulting in a blank page:
return (
<Router history={history}>
<Switch>
<Route exact path="/login" component={Login} />
<Route exact path="/signUp" component={SignUp} />
<Route exact path="/forget" component={Forget} />
<Route exact path="/weixinLogin" component={WeixinLogin} />
<App>
<Route exact path="/contacts/:organizationId/:uid/:ownerId" component={Contact} />
<Route exact path="/helpDetail/:id" component={HelpDetail} />
<div>
<Route exact path="/projects" component={Organization} />
<Route exact path="/organizations/:organizationId/projects" component={Organization} />
// switch
<Switch>
{/*<Route exact path="/projects" component={Projects} />*/}
</Switch>
</div>
<div>
<Route path="/secretary" component={Secretary} />
// switchswitch switch
<Switch>
<Route exact path="/secretary" component={SecretaryChat} />
<Route exact path="/secretary/chat" component={Secretary} />
<Route exact path="/secretary/log" component={SecretaryLog} />
<Route exact path="/secretary/chatRecord" component={ChatRecord} />
</Switch>
</div>
</App>
</Switch>
</Router>
);
how do you write the nesting route of the router4.0 version of the gods?