const MyProtectedPage = withPageAuthRequired(MyPage); Copy
const MyProtectedPage = withPageAuthRequired(MyPage);
When you wrap your pages in this higher order component and an anonymous user visits your page, they will be redirected to the login page and then returned to the page they were redirected from (after login).
Optional
When you wrap your pages in this higher order component and an anonymous user visits your page, they will be redirected to the login page and then returned to the page they were redirected from (after login).