Skip to content

API Reference / @gtkx/react / index / RootOptions

Type Alias: RootOptions ​

RootOptions = object

Defined in: packages/react/src/reconciler/root.ts:18

Options for createRoot, mirroring the options React DOM's own createRoot takes.

Properties ​

identifierPrefix? ​

optional identifierPrefix?: string

Defined in: packages/react/src/reconciler/root.ts:26

Prefix useId puts in front of every identifier it generates under this root.


onCaughtError? ​

optional onCaughtError?: (error, errorInfo) => void

Defined in: packages/react/src/reconciler/root.ts:22

Called for a render error an error boundary caught; the error is logged when this is omitted.

Parameters ​

error ​

unknown

errorInfo ​

CaughtErrorInfo

Returns ​

void


onRecoverableError? ​

optional onRecoverableError?: (error, errorInfo) => void

Defined in: packages/react/src/reconciler/root.ts:24

Called for a render error React recovered from by rendering again; the error is logged when this is omitted.

Parameters ​

error ​

unknown

errorInfo ​

ErrorInfo

Returns ​

void


onUncaughtError? ​

optional onUncaughtError?: (error, errorInfo) => void

Defined in: packages/react/src/reconciler/root.ts:20

Called for a render error no error boundary caught; the error is rethrown when this is omitted.

Parameters ​

error ​

unknown

errorInfo ​

ErrorInfo

Returns ​

void