关闭灯箱的完成块
Completion block for dismiss light box
有没有办法在关闭 lightBox 后立即执行代码?我正在寻找等效的完成块:
Navigator.dismissLightBox();
//wait for it to dismiss and execute code
您可以在 passProps 中传递回调并在 componentwillunmount
中调用该回调
Navigation.showLightBox({
screen: "example.LightBoxScreen",
passProps: {
onDismiss: () => console.log('dismissed')
}
});
有没有办法在关闭 lightBox 后立即执行代码?我正在寻找等效的完成块:
Navigator.dismissLightBox();
//wait for it to dismiss and execute code
您可以在 passProps 中传递回调并在 componentwillunmount
Navigation.showLightBox({
screen: "example.LightBoxScreen",
passProps: {
onDismiss: () => console.log('dismissed')
}
});