有没有像componentDidEnter
这样的事件?只有事件componentDidMount
有效,但是当使用this.props.navigator.pop();
更改页面时,我也需要调用函数
谢谢。
结合componentWillUnmount
、componentWillMount
和componentDidMount
应该可以帮助你实现你想要做的事情。
componentDidEnter
不起作用,但componentWillUpdate
,componentDidUpdate
和componentWillReceiveProps
工作正常。我在项目中使用了componentWillReceiveProps
。