Skip to content

ErrorBoundary

Defined in: packages/ui-react/src/components/ErrorBoundary.tsx:43

new ErrorBoundary(props): ErrorBoundary

Defined in: node_modules/.pnpm/@types+react@19.2.17/node_modules/@types/react/index.d.ts:958

ErrorBoundaryProps

ErrorBoundary

React.Component<ErrorBoundaryProps, State>.constructor

new ErrorBoundary(props, context): ErrorBoundary

Defined in: node_modules/.pnpm/@types+react@19.2.17/node_modules/@types/react/index.d.ts:966

ErrorBoundaryProps

any

value of the parent Context specified in contextType.

ErrorBoundary

React.Component<ErrorBoundaryProps, State>.constructor

static contextType: Context<WorkspaceI18nContextValue | null> = WorkspaceI18nContext

Defined in: packages/ui-react/src/components/ErrorBoundary.tsx:44

If set, this.context will be set at runtime to the current value of the given Context.

type MyContext = number
const Ctx = React.createContext<MyContext>(0)
class Foo extends React.Component {
static contextType = Ctx
context!: React.ContextType<typeof Ctx>
render () {
return <>My context's value: {this.context}</>;
}
}

https://react.dev/reference/react/Component#static-contexttype

React.Component.contextType


context: WorkspaceI18nContextValue | null

Defined in: packages/ui-react/src/components/ErrorBoundary.tsx:45

If using React Context, re-declare this in your class to be the React.ContextType of your static contextType. Should be used with type annotation or static contextType.

static contextType = MyContext
// For TS pre-3.7:
context!: React.ContextType<typeof MyContext>
// For TS 3.7 and above:
declare context: React.ContextType<typeof MyContext>

React Docs

React.Component.context


state: State

Defined in: packages/ui-react/src/components/ErrorBoundary.tsx:47

React.Component.state

static getDerivedStateFromError(error): State

Defined in: packages/ui-react/src/components/ErrorBoundary.tsx:49

Error

State


componentDidCatch(error, info): void

Defined in: packages/ui-react/src/components/ErrorBoundary.tsx:53

Catches exceptions generated in descendant components. Unhandled exceptions will cause the entire component tree to unmount.

Error

ErrorInfo

void

React.Component.componentDidCatch


reset(): void

Defined in: packages/ui-react/src/components/ErrorBoundary.tsx:61

void


render(): string | number | bigint | boolean | Iterable<ReactNode, any, any> | Promise<AwaitedReactNode> | Element | null | undefined

Defined in: packages/ui-react/src/components/ErrorBoundary.tsx:65

string | number | bigint | boolean | Iterable<ReactNode, any, any> | Promise<AwaitedReactNode> | Element | null | undefined

React.Component.render