reactjs - "Mask" Route react-router -
for example, have 2 routes:
<indexroute component={index} /> <route path="/categories/:slug" component={catfilter} />
then in navigation component have:
<nav classname="nav-main"> <ul> <li><indexlink to="/" activeclassname="active">work</indexlink></li> <li><link to="/posts" activeclassname="active">blog</link></li> <li><link to="/resume" activeclassname="active">resume</link></li> </ul> </nav>
is there way accomplish having indexlink in nav component receive active class when i'm on root page , /categories/:slug
page?
it's understanding defining indexlink strictly connects root, if accurate, there different way go it?
i'm new react-router i've read through numerous issues on github repository , can't seem find having similar issue. leads me believe that's might setting route structure incorrectly? appreciated!
Comments
Post a Comment