1111

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);

 

posted @ 2018-10-26 11:53  星小星啊  阅读(1077)  评论(0编辑  收藏  举报