React-router <Link> has no active class -
i <link>
s have active
class when match route. resulting <a>
tag doesn't change, when i'm on route referenced link.
my links created this: <link to="/status">status</link>
the routes:
<router> <route path='/' component={app}> <indexroute component={status} /> <route path='about' component={about}/> <route path='status' component={status}/> <route path='settings' component={settings}/> </route> </router>
does feature exist? if so, need change work.
ps: i'm using react-router redux-router. use default hashhistory because it's nwjs
-app
use activeclassname
property specify class add when link active.
<link to="/status" activeclassname="active">status</link>
Comments
Post a Comment