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