React router : child routers not working -
i have tried define child routs react router ( below code ) child route not working , doesn't returning error message.
<router> <route path="/" component={main} > <indexroute component={dashboard} /> <route path="create" component={userlist} /> <route path="user/create" component={createuser} /> <route path="creategroup" component={creategroup} /> <route path="groups" component={grouplist} /> <route path="premission" component={premissionlist}> <route path="create" component={createpremission} /> </route> </route> </router>
i need route premission/create
create premission component.
to multiple types of deep level/ nested routing need follow following approach:
<router> <route path="/" component={main} > <indexroute component={dashboard} /> <route path="create" component={userlist} /> <route path="user/create" component={createuser} /> <route path="creategroup" component={creategroup} /> <route path="groups" component={grouplist} /> </route> <route path="/premission" component={premissionlist}> <route path="create" component={createpremission} /> </route> </router>
Comments
Post a Comment