Want to resolve a react native EventEmitterListener warning? The only problem is that your event listeners are not removed, because the name of the componentWillUnmount method is incorrect. In your code the M of mount is capital, where as it should be lowercase.
1 2 3 4 5 | componentWillUnmount() { this.showLocateIconListener.remove(); this.endTripListener.remove(); this.endSubdivisionIcon.remove(); } |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.