React Router 4.x - PrivateRoute not working after connecting to Redux
PrivateRoute available in Example https://reacttraining.com/react-router/web/example/auth-workflow is not working after connecting with Redux. My PrivateRoute look almost same to the original version but only connected to Redux and used it instead of fakeAuth in the original example. const PrivateRoute = ({ component: Component, auth, ...rest }) => ( <Route {...rest} render={props => auth.isAuthenticated ? <Component {...props} /> : <Redirect to={{ pathname: "/login" }} />} /> ); PrivateRoute.propTypes = { auth: PropTypes.object.isRequired, component: PropTypes.func.isRequired } const