reactjs - React Router isActive doesn't work for child route -
i have following router
<route path="/" component={app}> <indexroute component={home}/> <route name="events" path="/events" component={events}> <route path=":eventid" component={details}/> </route> </route>
and following link: <link to={'/events'}>
when browse /events/1234
, this.context.router.isactive(this.props.to, true)
returns false
.
i tried configuration, it's same:
<route path="/" component={app}> <indexroute component={home}/> <route name="events" path="/events" component={events}> <route path="/events/:eventid" component={details}/> </route>
and tried <link to={'events'}>
(without /
) no more success. idea how isactive
true
when browsing /events/1234
?
Comments
Post a Comment