Remove listener for branch.subscribe method

Is there a way to remove the callback listener created by the branch.subscribe method? I am using branch.subscribe() method in React Native and would like to use it on two different components/screens. Currently, the callback on multiple components is invoked although the component has unmounted. This is causing serious issues. I would like to remove the subscribe listener when the component unmount occurs.

In addition, does the initial execution of the branch.subscribe() method always invoke the callback right away whether or not a link was clicked prior to the method being executed? If yes, I guess I could build a workaround.

Please let me know if you have any suggestion.

Add Comment
1 Answer(s)
Answered 3 days ago.

Can you please create a ticket for our integrations team here?

Commented 3 days ago.

Done

Self — Developer
Add Comment

Your Answer