Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

login condition if and else in router dom of react jsx

 let redirectToUrl;
      if ( not logged in ) //check condition
      {
        redirectToUrl = <Redirect to={loginPage}/>;
      }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #login #condition #router #dom #react #jsx
ADD COMMENT
Topic
Name
5+2 =