Question · Vibe coding with Claude Code course · Module 12: Medium clone
Where the boundary sends its report
In which method of a class ErrorBoundary do you send the report to Sentry?
Answer options
- static getDerivedStateFromError, because it learns about the error first
- componentDidCatch, because it gets the error and componentStack, and React calls it after drawing the fallback text
- render, because that is where you check hasError
- useEffect in the component that threw the error
You can check the correct answer by solving this task in the CodeWorlds game.