I'm using Reactstrap and React-router 4.0.0-beta.6 in the educational project that is located on gitlab with custom domain.
According to Reactstrap docs: that's the way I should use active navlink
import { NavLink } from 'reactstrap'
...
<NavLink href="#" active = true >Link< /NavLink>
According to React-router v4 docs:
import { NavLink } from 'react-router-dom'
...
<NavLink to="/about" activeClassName="active">About</NavLink>
So how should I do implement navlink active state and use react-router?
To use both, you'll need to rename one of those imports and use the tag prop in reactstrap NavLink. You won't be able to use the active prop on reactstrap NavLink because that logic exists in react router NavLink.
Here's what it should look like:
import { NavLink } from 'reactstrap';
import { NavLink as RRNavLink } from 'react-router-dom';
<NavLink to="/about" activeClassName="active" tag={RRNavLink}>About</NavLink>
More info here: https://github.com/reactstrap/reactstrap/issues/336