I am learning React.js. I am familiar with below code
class Login extends Component {
    state = { email: '',};
    render = () => {
        return (//some JSX code);
    }
}
But I got below code as solution of an issue.
const PrivateRoute = ({ component: Component, ...rest }) => (
    <Route
      {...rest}
        render={props =>
            (Auth.isAuthenticated() ? ( <Component {...props} />) : (<Redirect to={{ pathname: '/',}}/>))
      }
    />
);
I could not understand above code. Could anyone help me to understand ?
What is {...rest} here? 
I know spread operator. Why I am passing it here ({ component: Component, ...rest }) and here  <Route {...rest} ? What is it doing in this two places ? 
Why the render() is look like this render={props => } ?
Thanks all.
 
     
    