有没有办法在lightBox被解雇后立即执行代码?我正在寻找相当于完成块:
Navigator.dismissLightBox();
//wait for it to dismiss and execute code
答案 0 :(得分:1)
您可以在passProps中传递回调并在componentwillunmount
Navigation.showLightBox({
screen: "example.LightBoxScreen",
passProps: {
onDismiss: () => console.log('dismissed')
}
});