redirect with * react 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>
window.location.href = "http://mywebsite.com/home.html";
<Route exact path="/">
{loggedIn ? <Redirect to="/profile" /> : <HomePage />}
</Route>