I am new to the ReactJS world, and would like to know how can I pass active class name to the element instead of (Link) element
Using React Router v4, I only got it to work by including the tags within the NavLink component. The solutions which have the tags wrapping the links resulted in the HOME tag always having the active class.
import React from 'react'
import { NavLink } from 'react-router-dom';
class Header extends React.Component {
render() {
return (
)
}
}
export default Header
I adjusted the li and a CSS selectors accordingly.