【发布时间】:2018-12-01 10:09:55
【问题描述】:
需要根据拦截器内部的状态推送到特定位置,例如“/login”。
有没有办法直接推送到某个位置?
【问题讨论】:
-
请尝试使用
this.props.history.push("/login"); -
@Jin 拦截器中的
this.props是什么? -
我正在尝试将组件推到外部。在拦截器内。
标签: reactjs push router react-router-v4 history