Skip to content

Commit 46652c9

Browse files
author
Jonathan Como
authored
Show ReactElement as fallback in ErrorBoundary example (#3963)
1 parent 3b42ab9 commit 46652c9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/platforms/javascript/guides/react/components/errorboundary.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The React SDK exports an error boundary component that leverages [React componen
1010
import React from "react";
1111
import * as Sentry from "@sentry/react";
1212

13-
<Sentry.ErrorBoundary fallback={"An error has occurred"}>
13+
<Sentry.ErrorBoundary fallback={<p>An error has occurred</p>}>
1414
<Example />
1515
</Sentry.ErrorBoundary>;
1616
```
@@ -21,7 +21,7 @@ The Sentry Error Boundary is also available as a higher order component.
2121
import React from "react";
2222
import * as Sentry from "@sentry/react";
2323

24-
Sentry.withErrorBoundary(Example, { fallback: "an error has occurred" });
24+
Sentry.withErrorBoundary(Example, { fallback: <p>an error has occurred</p> });
2525
```
2626

2727
<Alert level="warning" title="Note">

0 commit comments

Comments
 (0)