What is the purpose of the componentDidCatch method in React Native?
The componentDidCatch method in React Native is called when an error occurs during rendering, in any of the children of the component. It is used to handle errors gracefully and prevent them from crashing the entire application.