Open
Description
Thanks for all the RR4 goodness.
I'm trying to understand this function a bit more:
Why have the render
of the Route
return the Redirect
instead of returning the Redirect
directly?
function PrivateRoute ({component: Component, authed, ...rest}) {
return (
authed === true
: <Route {...rest} render={props => <Component {...props} />
? <Redirect to={{pathname: '/login', state: {from: props.location}}} />
)
}
Metadata
Metadata
Assignees
Labels
No labels