Error Boundary

PRO

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-boundary

Usage

Pro Required

Error Boundary Demo

✅ Component working fine!

Recoveries via onReset: 0

Examples

Basic Error Boundary

PRO

Break/fix toggle wired to the real props: isolate stops the error from bubbling, showErrorDetails reveals the message in development, and onReset counts recoveries.

Pro Required

Error Boundary Demo

✅ Component working fine!

Recoveries via onReset: 0

Custom Error Fallback

PRO

Error boundary with custom fallback UI

Pro Required

Custom Error Fallback

❌ Error will be thrown on client

Error Monitoring & Analytics

PRO

Integration with monitoring services

Pro Required

Error Monitoring Integration

Safe Component

This component works fine.

Counter Component

Count: 0

Nested Error Boundaries

PRO

Granular error isolation with nested boundaries

Pro Required

Nested Error Boundaries

Payment Widget

Protected by nested boundary

User Profile

Count: 0

Auto-Recovery Patterns

PRO

Intelligent retry logic with auto-recovery

Pro Required

Auto-Recovery Pattern

Protected Component

This component has auto-recovery enabled with retry logic.

Component is working