[英]react-native event like componentDidEnter?
是否有类似componentDidEnter
事件? 仅事件componentDidMount
有效,但是当使用this.props.navigator.pop();
页面更改时,我还需要调用函数this.props.navigator.pop();
谢谢。
将componentWillUnmount
, componentWillMount
和componentDidMount
结合起来应该可以帮助您实现您想做的事情。 (请参阅组件规格和生命周期 )
componentDidEnter
不起作用,但是componentWillUpdate
, componentDidUpdate
和componentWillReceiveProps
可以正常工作。 我在项目中使用componentWillReceiveProps
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.