ErrorObserver 📌

Observes any exceptions in child tree hierarchy. When an exception is caught, displays an Error state to gracefully handle it on the frontend.

System Component 📌

This component is shipped with BlueBase Core.

Usage

<ErrorObserver>
 <Text>Rendered if there is no error here</Text>
</ErrorObserver>

Properties

prop

type

required

default

description

error

Error

no

-

If an error is passed as a prop, shows an error state.

checkError

(props) => Error

no

-

A function to check error based on props.

errorComponent

Component

no

-

Component to show the error state.

children

ReactNode | (() => ReactNode)

no

-

Children are rendered when there are no error.

testID

string

no

-

Used to locate this view in end-to-end tests.

Last updated