Since our Login component is rendered using a Route , it adds the router props to it. So we can redirect using the this.props.history.push method..