1

有没有办法在灯箱被关闭后立即执行代码?我正在寻找相当于完成块:

Navigator.dismissLightBox();
//wait for it to dismiss and execute code
4

1 回答 1

1

您可以在passProps中传递一个回调并在componentwillunmount

Navigation.showLightBox({
  screen: "example.LightBoxScreen",
  passProps: {
    onDismiss: () => console.log('dismissed')
  }
});
于 2017-07-06T12:24:53.767 回答