protected-route-func
v0.1.0
Published
react protected route component
Downloads
2
Maintainers
Readme
React protected router
a simple React component to protect site routers that requires authentication or some aother permissions '''jsx
import { Navigate } from 'react-router-dom'; const ProtectedRoute = ({ user, children , redirect = 'login' }) => { if (!user) { return ; } return children; };
'''