This is how the routes are set up:
var RRoutes = (
<Route handler={App}>
<Route name="home" path="/" handler={Page} />
<Route name="portfolio" path="portfolio">
<DefaultRoute handler={Page} />
<Route name="portfolio.items" path=":page" handler={test} />
</Route>
<Route name="pages" path=":page" handler={Page} />
</Route>
);
When "/portfolio" page is loaded the link gets active. If the child route "portfolio.items" is loaded, the parent active link disappears.. Any suggestions how to get this to work?
This is how the routes are set up:
var RRoutes = (
<Route handler={App}>
<Route name="home" path="/" handler={Page} />
<Route name="portfolio" path="portfolio">
<DefaultRoute handler={Page} />
<Route name="portfolio.items" path=":page" handler={test} />
</Route>
<Route name="pages" path=":page" handler={Page} />
</Route>
);
When "/portfolio" page is loaded the link gets active. If the child route "portfolio.items" is loaded, the parent active link disappears.. Any suggestions how to get this to work?
Share Improve this question edited Aug 9, 2015 at 11:03 Martyboy asked Aug 9, 2015 at 8:54 MartyboyMartyboy 3703 silver badges16 bronze badges 3-
looking at the
handler
properties I'm guessing you're using version 0.13.3? – knowbody Commented Aug 9, 2015 at 10:07 - Yes, "react-router": "^0.13.3" – Martyboy Commented Aug 9, 2015 at 10:19
- My current work around is adding the "/portfolio" path name to app classes and use "#app.portfolio li.item.portfolio" and set fake active class.. – Martyboy Commented Aug 9, 2015 at 11:08
1 Answer
Reset to default 4Turns out the problem was that I used "/portfolio" instead of "portfolio"
<Link to="portfolio">
Answered by taurose in github. https://github./rackt/react-router/issues/1684