Reputation: 413
<li className="nav-item">
<NavLink className="nav-link" to={"/QaManagement" + domainName}>
<span className="Qimg" onClick={this.clicked}>
<img src={imageVar.QA} alt="" />
</span>
</NavLink>
</li>
I want to change the image when the link is active, I can not use the exact property also as a domainName is a variable.
Upvotes: 5
Views: 109
Reputation: 56
I am facing the same issue using activeClassName with exact property and activeClassName="active" with onlyActiveOnIndex attribute and it worked for me
Upvotes: 1