mirror of
https://github.com/addyosmani/agent-skills.git
synced 2026-10-26 15:05:04 +00:00
Merge #637: make the shipping error boundary render its fallback
This commit is contained in:
1 file changed
+6
@@ -190,6 +190,12 @@ Client metrics:
|
||||
```typescript
|
||||
// Set up error boundary with reporting
|
||||
class ErrorBoundary extends React.Component {
|
||||
state = { hasError: false };
|
||||
|
||||
static getDerivedStateFromError() {
|
||||
return { hasError: true };
|
||||
}
|
||||
|
||||
componentDidCatch(error: Error, info: React.ErrorInfo) {
|
||||
// Report to error tracking service
|
||||
reportError(error, {
|
||||
|
||||
Reference in new issue
Block a user