1. Recently, I learned React by myself, made a small system, and reported it by clicking the logout button

2. Pass the history from the parent component

The code for

history={this.props.history}

3, the effect is out