Question · JavaScript and React course · Module 16: Error Handling and Suspense
Error Monitoring in Production
Which Error Boundary method is best for logging errors to an external service?
Answer options
- constructor()
- render()
- getDerivedStateFromError()
- componentDidCatch(error, errorInfo)
You can check the correct answer by solving this task in the CodeWorlds game.