使用this.props.history.push("/login");跳转报错

#1

哪位大佬帮忙看看 谢谢

报错信息:

Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.
    in PasswordReset (created by Form(PasswordReset))
    in Form(PasswordReset) (created by Route)
#2

看样子你是想在组件卸载的时候让其路由跳转,componentwillunmont这个生命周期不能进行状态变更,你可以在某个事件里面更改路由

#3

我没有在组件卸载的时候进行跳转啊 我都没有写componentWillUnMont这个钩子