You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -106,9 +106,9 @@ Configuration options for the test renderer. Many of these options correspond to
106
106
|`transformHiddenInstanceProps`|`({ props, type }: { props: Record<string, unknown>; type: string }) => Record<string, unknown>`| Transforms host instance props when React marks an instance as hidden (for example, while Suspense fallback is shown). Return a new props object instead of mutating the provided one. When provided, hidden instances stay visible in `children` and `toJSON()` output using transformed props. |
107
107
|`identifierPrefix`|`string`| A string prefix React uses for IDs generated by `useId()`. Useful to avoid conflicts when using multiple roots. |
108
108
|`isStrictMode`|`boolean`| Enable React Strict Mode. When enabled, components render twice and effects run twice in development. |
109
-
|`onCaughtError`|`(error: unknown, errorInfo: { componentStack: string }) => void`| Callback called when React catches an error in an Error Boundary. Called with the error caught by the Error Boundary and an errorInfo object containing the component stack. |
110
-
|`onUncaughtError`|`(error: unknown, errorInfo: { componentStack: string }) => void`| Callback called when an error is thrown and not caught by an Error Boundary. Called with the error that was thrown and an errorInfo object containing the component stack. |
111
-
|`onRecoverableError`|`(error: unknown, errorInfo: { componentStack: string }) => void`| Callback called when React automatically recovers from errors. Called with an error React throws and an errorInfo object containing the component stack. Some recoverable errors may include the original error cause as `error.cause`. |
109
+
|`onCaughtError`|`(error: unknown, errorInfo: { componentStack?: string }) => void`| Callback called when React catches an error in an Error Boundary. Called with the error caught by the Error Boundary and an errorInfo object containing the component stack. |
110
+
|`onUncaughtError`|`(error: unknown, errorInfo: { componentStack?: string }) => void`| Callback called when an error is thrown and not caught by an Error Boundary. Called with the error that was thrown and an errorInfo object containing the component stack. |
111
+
|`onRecoverableError`|`(error: unknown, errorInfo: { componentStack?: string }) => void`| Callback called when React automatically recovers from errors. Called with an error React throws and an errorInfo object containing the component stack. Some recoverable errors may include the original error cause as `error.cause`. |
0 commit comments