Implement error boundaries with fallback UI and error reporting
Add error boundaries to {{AREA}}:
Requirements:
1. Catch JavaScript errors in component tree
2. Display fallback UI instead of white screen
3. Log errors to monitoring service
4. Allow users to retry or navigate away
5. Report errors with context (component, props, user)
6. Handle async errors (Suspense + Error Boundary)
Implementation:
1. Create ErrorBoundary component with componentDidCatch
2. Add error fallback UI components
3. Wrap route segments with error boundaries
4. Add error reporting hook
5. Create retry mechanism
6. Add error page for unhandled errors
Provide:
- ErrorBoundary component
- Fallback UI components
- Error reporting integration
- Error page template
- Usage examples
- Testing strategyImproving error handling in React apps