Actions.refresh({
title: this.props.restToggle_b ?
`Next: ${stretchList[this.props.stretchId].name}` :
`${stretchList[this.props.stretchId].name}`,
onExit: () => { console.log('lit'); }
});
更新标题有效。用其他道具更新代替onExit。 onExit在场景声明时起作用。由于某种原因,当我在场景上使用actions.refresh并按返回按钮时,不会调用onExit。我正在尝试在场景刷新时为onExit道具分配一个功能。有什么作用?
react-native -v:0.57.5
router-flux -v:4.0.6
可以在这里https://github.com/ibbi/simplestretch/blob/master/src/components/StretchScreen.js
找到完整的上下文