I have two navigation buttons that utilize the tag of react-router-dom. The problem I am facing is when I shift from the first button to the second button, the first button still remains active.
In my situation, I have a runs button and input button
The runs button is in active state, but when the input button is clicked, the run button is still active
Here is my snippet showing the navigation tabs : import { NavLink } from "react-router-dom";
<div className = "navigation-tabs">
<NavLink to={`/tasks/${task}`} activeStyle={{ backgroundColor: '#0022ff', color: '#FFF' }}>
Runs
</NavLink>
<NavLink to={`/tasks/${task}/input`} activeStyle={{ backgroundColor: '#0022ff', color: '#FFF' }}>
Input
</NavLink>
</div>