react native 安卓home返回键页面刷新

import { withNavigationFocus } from 'react-navigation';
class Warngreete extends React.Component {
constructor(props) {
super(props);
}

componentDidMount() {
this.reload();
}
 
 
    
componentWillReceiveProps(newProps) {
if(newProps.isFocused){
this.reload();
}
}

//页面执行函数
reload(){}

}
export default withNavigationFocus(Warngreete);

猜你喜欢

转载自www.cnblogs.com/yuxingxingstar/p/9855524.html