Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Standardized guidelines and patterns for Frontend Quality Error Boundaries.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-16 | ✗→✓ | ▲ Improved | -63% | 0% |
| case-10 | ✓→✗ | ▼ Worse | -48% | 0% |
| case-01 | ✓→✓ | = Same ✓ | -3% | 0% |
| case-02 | ✓→✓ | = Same ✓ | 7% | 0% |
| case-03 | ✓→✓ | = Same ✓ | -12% | 0% |
typescriptclass ErrorBoundary extends React.Component< { children: React.ReactNode }, { hasError: boolean; error: Error | null } > { state = { hasError: false, error: null }; static getDerivedStateFromError(error: Error) { return { hasError: true, error }; } componentDidCatch(error: Error, errorInfo: ErrorInfo) { console.error('Caught error:', error, errorInfo); } render() { if (this.state.hasError) { return ( <div> <h1>Something went wrong</h1> <button onClick={() => this.setState({ hasError: false })}> Try again </button> </div> ); } return this.props.children; } }
typescript<ErrorBoundary> <App /> </ErrorBoundary>
Other measured skills in the registry, with their headline benchmark lift.