What is the purpose of the componentDidUnmount method in React Native?
The componentDidUnmount method in React Native is called just before the component is removed from the DOM and destroyed. It is often used to perform cleanup tasks such as unsubscribing from external events or clearing timers.