MCPcopy Create free account
hub / github.com/kenberkeley/react-demo / componentWillMount

Method componentWillMount

src/components/Redirect.js:17–21  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15 */
16class 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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected