Answers for "how to redirect using react hooks"

50

redirect react js

window.location.href = "http://mywebsite.com/home.html";
Posted by: Guest on July-18-2019
7

redirect react router

<Route exact path="/">
  {loggedIn ? <Redirect to="/profile" /> : <HomePage />}
</Route>
Posted by: Guest on March-07-2020

Code answers related to "how to redirect using react hooks"

Code answers related to "Javascript"

Browse Popular Code Answers by Language