Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

react redirect to url

import { Route, Redirect } from 'react-router'

<Route exact path="/" render={() => (
  loggedIn ? (
    <Redirect to="/dashboard"/>
  ) : (
    <PublicHomePage/>
  )
)}/>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #react #redirect #url
ADD COMMENT
Topic
Name
9+4 =