Error Boundary
Advanced error boundary with intelligent error handling, auto-recovery patterns, monitoring integration, and granular error isolation.
Pro Features
Unlock advanced capabilities with the Pro version
Error Isolation
Prevent cascading failures with granular boundaries
Error Callbacks
onError hook to forward caught errors to your monitoring service
Auto-Reset
Automatically reset the boundary via resetKeys or resetOnPropsChange
Nested Boundaries
Component-level error handling and isolation
Custom Fallbacks
Design beautiful error states matching your brand
Dev Mode
Detailed error info and stack traces in development
Installation
Install via CLI
npx @moontra/moonui-cli add error-boundaryUsage
Error Boundary Demo
Recoveries via onReset: 0
Examples
Basic Error Boundary
Break/fix toggle wired to the real props: isolate stops the error from bubbling, showErrorDetails reveals the message in development, and onReset counts recoveries.
Error Boundary Demo
Recoveries via onReset: 0
Custom Error Fallback
Error boundary with custom fallback UI
Custom Error Fallback
Error Monitoring & Analytics
Integration with monitoring services
Error Monitoring Integration
Safe Component
This component works fine.
Counter Component
Nested Error Boundaries
Granular error isolation with nested boundaries
Nested Error Boundaries
Payment Widget
Protected by nested boundary
User Profile
Auto-Recovery Patterns
Intelligent retry logic with auto-recovery
Auto-Recovery Pattern
Protected Component
This component has auto-recovery enabled with retry logic.