I need multiple nested routes in react-router-dom in home Page
--- Home --- Page 1 --- Page 2 --- About
I have home page that contains two subs the active class will be worked based the path Home/HomeNested page This my requirement. But It work on The home page is active on page load if I click nested homepage page the home page active gone. code sandbox Link:https://codesandbox.io/s/react-router-nesting-forked-71x4z?file=/example.js
I've debuged your code a bit. You've missed exact on '/' path. Please check nesting routes I've made in /topics/[route] for you here:
Thank you for example of NavLink. I didn't even know about this component from react-router :p