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: src/content/reference/react/Component.md
+2-3
Original file line number
Diff line number
Diff line change
@@ -1273,7 +1273,7 @@ By default, if your application throws an error during rendering, React will rem
1273
1273
1274
1274
To implement an error boundary component, you need to provide [`static getDerivedStateFromError`](#static-getderivedstatefromerror) which lets you update state in response to an error and display an error message to the user. You can also optionally implement [`componentDidCatch`](#componentdidcatch) to add some extra logic, for example, to log the error to an analytics service.
1275
1275
1276
-
<CanaryBadge /> With [`captureOwnerStack`](/reference/react/captureOwnerStack) you can include the Owner Stack during development.
1276
+
With [`captureOwnerStack`](/reference/react/captureOwnerStack) you can include the Owner Stack during development.
1277
1277
1278
1278
```js {9-12,14-27}
1279
1279
import*asReactfrom'react';
@@ -1298,8 +1298,7 @@ class ErrorBoundary extends React.Component {
1298
1298
// in div (created by App)
1299
1299
// in App
1300
1300
info.componentStack,
1301
-
// Only available in react@canary.
1302
-
// Warning: Owner Stack is not available in production.
1301
+
// Warning: `captureOwnerStack` is not available in production.
0 commit comments