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

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -