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);
原文地址:https://www.cnblogs.com/yuxingxingstar/p/9855524.html
时间: 2024-10-07 21:39:57