vuvu vuvu - 5 months ago 53
React JSX Question

How to highlight active link-element in react js?

I have a list of link-elements, the clicked link-element shall have another background-color. What is the best way to achieve that in react.js ?

render() {
return (


You should simply be able to apply the acctiveClassName attribute to the Link like so

<Link to="/about" activeClassName="active">About</Link>

see this link for more info.