Skip to content

Instantly share code, notes, and snippets.

Auth with React Router v4
<Switch>
<Route path={Routes.LOGIN} component={LoginRoute}/>
<Route path={Routes.ROOT} render={props => <AuthenticatedRoute>
<Route path={Routes.WHATEVER} component={Whatever}/>
</AuthenticatedRoute>}/>
</Switch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment