<Router>
<div>
<PrivateRoute path="/" auth={Math.random() > Math.random()} redirect={"/login"} component={loadable(() => import("./pages/home"))} />
<Route exact path="/login" component={loadable(() => import("./pages/login"))} />
</div>
</Router>
-
Notifications
You must be signed in to change notification settings - Fork 2
Too lazy to rewrite it all the time, so here it is - simple private route(might or might not be based on https://reacttraining.com/react-router/web/example/auth-workflow)
License
muningis/react-router-private-route
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Too lazy to rewrite it all the time, so here it is - simple private route(might or might not be based on https://reacttraining.com/react-router/web/example/auth-workflow)
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published