【发布时间】:2017-07-05 19:12:31
【问题描述】:
有没有办法在灯箱关闭后立即执行代码?我正在寻找相当于完成块:
Navigator.dismissLightBox();
//wait for it to dismiss and execute code
【问题讨论】:
标签: react-native react-native-navigation
有没有办法在灯箱关闭后立即执行代码?我正在寻找相当于完成块:
Navigator.dismissLightBox();
//wait for it to dismiss and execute code
【问题讨论】:
标签: react-native react-native-navigation
您可以在passProps 中传递回调并在componentwillunmount 中调用该回调
Navigation.showLightBox({
screen: "example.LightBoxScreen",
passProps: {
onDismiss: () => console.log('dismissed')
}
});
【讨论】: