We lave listeners like
Navigation.events().registerComponentDidDisappearListener(({ componentId, componentName }) => {});
How can we unsubscribe from it? Do we even need to do it?
Navigation.events().registerComponentDidDisappearListener(({ componentId, componentName }) => {});
@rendomnet All methods of Navigation.events() return the instance of event subscription.
You can use remove method of it.
eventSubscription1 = Navigation.events().bindComponent(this);
eventSubscription2 = Navigation.events().registerComponentDidDisappearListener(({ componentId, componentName }) => {});
...
eventSubscription1.remove();
eventSubscription2.remove();
Hope this helps you!
Most helpful comment
@rendomnet All methods of
Navigation.events()return the instance of event subscription.You can use
removemethod of it.Hope this helps you!