Reputation: 255
Is there way to execute the code right after lightBox has been dismissed? I am looking for an equivalent of completion block:
Navigator.dismissLightBox(); //wait for it to dismiss and execute code
Upvotes: 1
Views: 573
Reputation: 3501
You can pass a callback in passProps and invoke that callback in componentwillunmount
componentwillunmount
Navigation.showLightBox({ screen: "example.LightBoxScreen", passProps: { onDismiss: () => console.log('dismissed') } });