error-boundary
SolidReact error boundary hierarchy, fallback UI patterns, offline-first fallback, retry mechanisms, and graceful degradation.
AI & Automation 501 stars
42 forks Updated yesterday MIT
Install
Quality Score: 91/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
Skill Content
# Error Boundary Patterns
React error boundary hierarchy and graceful degradation patterns.
## Error Boundary Component
```typescript
// Class-based (React requirement for componentDidCatch)
interface ErrorBoundaryProps {
children: React.ReactNode
fallback?: React.ComponentType<FallbackProps>
onError?: (error: Error, info: React.ErrorInfo) => void
}
interface ErrorBoundaryState {
error: Error | null
}
export interface FallbackProps {
error: Error
reset: () => void
}
export class ErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoundaryState> {
state: ErrorBoundaryState = { error: null }
static getDerivedStateFromError(error: Error): ErrorBoundaryState {
return { error }
}
componentDidCatch(error: Error, info: React.ErrorInfo) {
console.error('[ErrorBoundary]', error, info.componentStack)
this.props.onError?.(error, info)
}
reset = () => this.setState({ error: null })
render() {
if (this.state.error) {
const Fallback = this.props.fallback ?? DefaultFallback
return <Fallback error={this.state.error} reset={this.reset} />
}
return this.props.children
}
}
// react-error-boundary library (recommended — battle-tested)
// npm install react-error-boundary
import { ErrorBoundary } from 'react-error-boundary'
<ErrorBoundary
FallbackComponent={MyFallback}
onError={(error, info) => reportToSentry(error, info)}
onReset={() => queryClient.clear()}
>
<App />
</ErrorBoundary>
```
## Error Bound...
Details
- Author
- vibeeval
- Repository
- vibeeval/vibecosystem
- Created
- 2 months ago
- Last Updated
- yesterday
- Language
- C#
- License
- MIT
Integrates with
Similar Skills
Semantically similar based on skill content — not just same category
Web & Frontend Listed
pitfalls-react
React component patterns, forms, accessibility, and responsive design. Use when building React components, handling forms, or ensuring accessibility. Triggers on: React component, useEffect, form validation, a11y, responsive, Error Boundary.
353 Updated today
aiskillstore AI & Automation Listed
dev-error-handling
Error handling strategy. Trigger when the user wants to implement error handling, exceptions, or error boundaries.
4 Updated today
christopherlouet AI & Automation Listed
cross-platform-error-handling
Design consistent error handling across web, mobile, and React Native—central handlers, user-facing copy, retry, and logging.
16 Updated 1 weeks ago
charlieviettq