> ISPO SDK documentation. [HTML](https://ispo.ai/docs/classes/react.IspoErrorBoundary.html) · [Documentation index](https://ispo.ai/docs/llms.txt)

# Class IspoErrorBoundary

#### Hierarchy

*   Component<[IspoErrorBoundaryProps](../interfaces/react.IspoErrorBoundaryProps.md), [IspoErrorBoundaryState](../interfaces/react.Supporting_types.IspoErrorBoundaryState.md)\>
    *   IspoErrorBoundary

##### Index

### <a id="constructors"></a>Constructors

[constructor](#constructor)

### <a id="properties"></a>Properties

[state](#state)

### <a id="methods"></a>Methods

[componentDidCatch](#componentdidcatch) [render](#render) [getDerivedStateFromError](#getderivedstatefromerror)

## <a id="constructors-1"></a>Constructors

### <a id="constructor"></a>constructor

*   <a id="constructorispoerrorboundary"></a>
    
    ```typescript
    new IspoErrorBoundary(props: IspoErrorBoundaryProps): IspoErrorBoundary
    ```
    
    Types: [IspoErrorBoundaryProps](../interfaces/react.IspoErrorBoundaryProps.md), IspoErrorBoundary
    
    #### Parameters
    
    *   props: [IspoErrorBoundaryProps](../interfaces/react.IspoErrorBoundaryProps.md)
    
    #### Returns IspoErrorBoundary
    
    Inherited from Component< IspoErrorBoundaryProps, IspoErrorBoundaryState >.constructor
    
*   <a id="constructorispoerrorboundary-1"></a>
    
    ```typescript
    new IspoErrorBoundary(
        props: IspoErrorBoundaryProps,
        context: any,
    ): IspoErrorBoundary
    ```
    
    Types: [IspoErrorBoundaryProps](../interfaces/react.IspoErrorBoundaryProps.md), IspoErrorBoundary
    
    #### Parameters
    
    *   props: [IspoErrorBoundaryProps](../interfaces/react.IspoErrorBoundaryProps.md)
    *   context: any
        
        value of the parent [Context](https://react.dev/reference/react/Component#context) specified in `contextType`.
        
    
    #### Returns IspoErrorBoundary
    
    Inherited from Component< IspoErrorBoundaryProps, IspoErrorBoundaryState >.constructor
    

## <a id="properties-1"></a>Properties

### <a id="state"></a>state

```typescript
state: IspoErrorBoundaryState = ...
```

Types: [IspoErrorBoundaryState](../interfaces/react.Supporting_types.IspoErrorBoundaryState.md)

Overrides Component.state

## <a id="methods-1"></a>Methods

### <a id="componentdidcatch"></a>componentDidCatch

*   <a id="componentdidcatch-1"></a>
    
    ```typescript
    componentDidCatch(error: Error, info: ErrorInfo): void
    ```
    
    Catches exceptions generated in descendant components. Unhandled exceptions will cause the entire component tree to unmount.
    
    #### Parameters
    
    *   error: Error
    *   info: ErrorInfo
    
    #### Returns void
    
    Overrides Component.componentDidCatch
    

### <a id="render"></a>render

*   <a id="render-1"></a>
    
    ```typescript
    render(): ReactNode
    ```
    
    #### Returns ReactNode
    
    Overrides Component.render
    

### <a id="getderivedstatefromerror"></a>`Static`getDerivedStateFromError

*   <a id="getderivedstatefromerror-1"></a>
    
    ```typescript
    getDerivedStateFromError(_error: Error): IspoErrorBoundaryState
    ```
    
    Types: [IspoErrorBoundaryState](../interfaces/react.Supporting_types.IspoErrorBoundaryState.md)
    
    #### Parameters
    
    *   \_error: Error
    
    #### Returns [IspoErrorBoundaryState](../interfaces/react.Supporting_types.IspoErrorBoundaryState.md)
