title: React Router 4.x - PrivateRoute not working after connecting to Redux
body: <p>PrivateRoute available in Example <a href="https://reacttraining.com/react-router/web/example/auth-workflow" rel="noreferrer">https://reacttraining.com/react-router/web/example/auth-workflow</a> is not working after connecting with Redux.</p>
  
  <p>My PrivateRoute look almost same to the original version but only <strong>connected to Redux</strong> and used it instead of fakeAuth in the original example.</p>
  
  <pre><code>const PrivateRoute = ({ component: Component, auth, ...rest }) =&gt; (
    &lt;Route
     {...rest}
     render={props =&gt;
     auth.isAuthenticated
      ? &lt;Component {...props} /&gt;
      : &lt;Redirect to={{ pathname: "/login" }} /&gt;}
    /&gt;
  );
  
   PrivateRoute.propTypes = {
    auth: PropTypes.object.isRequired,
    component: PropTypes.func.isRequired
   }
  
   const mapStateToProps = (state, ownProps) =&gt; {
    return {
       auth: state.auth
    }
  };
  
  export default connect(mapStateToProps)(PrivateRoute);
  </code></pre>
  
  <p><strong>Usage and result:-</strong></p>
  
  <ol>
  <li>NOT working but <strong>desired &amp; expecting</strong> to work
  
  <ul>
  <li><code>&lt;PrivateRoute path="/member" component={MemberPage} /&gt;</code></li>
  </ul></li>
  <li>working but NOT desired to used like this
  
  <ul>
  <li><code>&lt;PrivateRoute path="/member" component={MemberPage} auth={auth} /&gt;</code></li>
  </ul></li>
  <li>working. JUST to work but NOT desired to used at all. An understanding from this point is that, if you connect original PrivateRoute to Redux you need to pass some additional props (any prop) to make PrivateRoute working otherwise it does not work. <strong>Anyone, please give some hint on this behavior</strong>. This is my main question
  
  <ul>
  <li><code>&lt;PrivateRoute path="/member" component={MemberPage} anyprop={{a:1}} /&gt;</code></li>
  </ul></li>
  </ol>