方法1:
ページが戻るときのパラメーター
Actions.popTo( 'login'); setTimeout(()=> { Actions.refresh({phone:this.state.phoneTextValue、pwd:this.state.passwordValue}) })
前のページのパラメーターを受け入れます。
componentWillReceiveProps(nextProps):void { // console.log( 'componentWillReceiveProps') this.setState({phoneTextValue:nextProps.phone、passwordValue:nextProps.pwd}) }
方法2:
セルバックパラメータの更新を含む設定ページに移動します。
Actions.setting({refresh:()=> {this.getUserInfo()}、})}
2ページ目が戻る直前:通行人のセルバックパラメータrefresh()を呼び出します。getUserInfoに関連するビジネスコードを実装する
Actions.pop(this.props.refresh());