how to use react-router-dom to link html to href code example
Example 1: link tag react
<Link to={`/users/${user.id}`} activeClassName="active">{user.name}</Link>
<a href="/users/123" class="active">Michael</a>
<a href="#/users/123">Michael</a>
<Link to={`/users/${user.id}`} activeClassName="current">{user.name}</Link>
<Link to="/users" style={{color: 'white'}} activeStyle={{color: 'red'}}>Users</Link>
Example 2: link in react
<Link
to={{
pathname: "/courses",
search: "?sort=name",
hash: "#the-hash",
state: { fromDashboard: true }
}}
/>