html link react code example
Example 1: link react to html
<script crossorigin src="https://unpkg.com/react@17/umd/react.development.js"></script>
<script crossorigin src="https://unpkg.com/react-dom@17/umd/react-dom.development.js"></script>
Example 2: 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 3: link in react
<Link
to={{
pathname: "/courses",
search: "?sort=name",
hash: "#the-hash",
state: { fromDashboard: true }
}}
/>