activeClassname active when a different page is active too code example
Example 1: why navlink in react router always active
<li> <NavLink exact to='/' activeClassName="active-link">Home</NavLink> </li>
Example 2: why navlink in react router always active
<li> <NavLink to='/' activeClassName="active-link" isActive={checkActive}>Home</NavLink> </li>