componentDidCatch is often used to report errors along with component stack information to an error monitoring service.