Put in order · Vibe coding with Claude Code course · Module 12: Medium clone

The order inside an error boundary

Arrange what happens in a class ErrorBoundary when a component inside it throws an error during rendering:

Items to put in order

  • render() draws the fallback text from the fallback prop
  • A component inside the boundary throws an error during rendering
  • componentDidCatch calls Sentry.captureException
  • static getDerivedStateFromError returns { hasError: true }

You can check the correct answer by solving this task in the CodeWorlds game.