redirect in react js url code example
Example 1: javascript redirect
window.location.href = "http://mywebsite.com/home.html";
Example 2: redirect react router
<Route exact path="/">
{loggedIn ? <Redirect to="/profile" /> : <HomePage />}
</Route>