redirect to particular location in react js code example
Example 1: redirect to in react js
<Route exact path="/">
{loggedIn ? <Redirect to="/dashboard" /> : <PublicHomePage />}
</Route>
Example 2: redirect to another path react
<span className="input-group-btn">
<Link to="/login" />Click to login</Link>
</span>