ThatAIguyA world of ideas

THE CONSCIOUSNESS ATLAS
Read. Experiment. Follow the evidence.

ConsciousnessLearn · Explore · Joseph Anady

Janady13/llms-txt-hub / packages/design-system/components/custom/error-boundary.tsx

Source identity, revision, and recovered contents.

GitHub sourceSource text recovered

Source identity

FieldRecorded value
Source typeGitHub source
Original recordJanady13/llms-txt-hub / packages/design-system/components/custom/error-boundary.tsx
DateNot specified in source
RepositoryJanady13/llms-txt-hub
Revisione0f4bf978d4df168369c7601d9c5f5ea89e84377
Branchmain
Path or archive memberpackages/design-system/components/custom/error-boundary.tsx
Original SHA-256eb88eeddc4c7dda7901a1ef10a0db0f243d40509e83efa400a5336d566e34c81
Git blob SHA4cec3bd8ce1a121acbefce2fad49e2c1c3d61895
Reading-copy SHA-256eb88eeddc4c7dda7901a1ef10a0db0f243d40509e83efa400a5336d566e34c81

Original source ↗

Recovered source transcript

import type { ErrorInfo, ReactNode } from 'react' import { Component } from 'react' interface Props { onError?: (error: Error, info: ErrorInfo) => void fallback: ReactNode children: ReactNode } interface State { hasError: boolean error?: Error } export class ErrorBoundary extends Component<Props, State> { readonly state: State = { hasError: false } // biome-ignore lint/complexity/noUselessConstructor: React component needs constructor for proper initialization constructor(props: Props) { super(props) } static getDerivedStateFromError(error: Error): State { return { hasError: true, error } } componentDidCatch(error: Error, info: ErrorInfo) { this.props.onError?.(error, info) } render() { if (this.state.hasError) { return this.props.fallback || <div>Something went wrong</div> } return this.props.children } }

Search equations, builds, manuscript text, and recovered sources.