Class: ErrorBoundary
Defined in: src/betterdiscord/ui/errorboundary.tsx:15
Extends
Component<ErrorBoundaryProps, {hasError:boolean; }>
Constructors
Constructor
ts
new ErrorBoundary(props: ErrorBoundaryProps): ErrorBoundary;Defined in: src/betterdiscord/ui/errorboundary.tsx:26
Creates an error boundary with optional fallbacks and debug info.
Parameters
| Parameter | Type | Description |
|---|---|---|
props | ErrorBoundaryProps |
Returns
ErrorBoundary
Overrides
ts
React.Component<ErrorBoundaryProps, {hasError: boolean;}>.constructorMethods
componentDidCatch()
ts
componentDidCatch(error: Error): void;Defined in: src/betterdiscord/ui/errorboundary.tsx:31
Catches exceptions generated in descendant components. Unhandled exceptions will cause the entire component tree to unmount.
Parameters
| Parameter | Type |
|---|---|
error | Error |
Returns
void
Overrides
ts
React.Component.componentDidCatchrender()
ts
render():
| string
| number
| bigint
| boolean
| Iterable<ReactNode, any, any>
| Promise<AwaitedReactNode>
| Element
| null
| undefined;Defined in: src/betterdiscord/ui/errorboundary.tsx:37
Returns
| string | number | bigint | boolean | Iterable<ReactNode, any, any> | Promise<AwaitedReactNode> | Element | null | undefined
Overrides
ts
React.Component.render