score:1

Accepted answer
if (loginState == true) {
      return <Redirect to="/" />;
}

Related Query

More Query from same tag