()
| 15 | */ |
| 16 | class Redirect extends Component { |
| 17 | componentWillMount() { |
| 18 | this.props.router.replace( // 可以直接通过 props 获取 router |
| 19 | this.props.location.query.dest |
| 20 | ) |
| 21 | } |
| 22 | |
| 23 | render () { |
| 24 | // 非实体组件需显式返回 null |
nothing calls this directly
no outgoing calls
no test coverage detected