i'm trying to use nested routing in react router. But my nesting routig not working. If that's make diffrence i'm using Typescript.
//This is working
<Route exact path={path} component={StudentList}></Route>
//This is not working
<Route path={`${path}/:id`} component={StudentComponent}></Route>
I have a module called StudentModule. In module a have two routes like above when i route to
/students/1
nothing render
I created a sample app on CodeSandbox https://codesandbox.io/s/vibrant-pasteur-n1eq7
To see what's wrong, navigate to students in menu then click student. It's needs to render StudentComponent and writes Student works
on the screen.
Pls help me what's wrong in my code ?