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

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -