Skip to content

Commit b3314e5

Browse files
Merge branch 'master' of https://github.com/reactjs/reactjs.org into sync-df2fbde3
2 parents 8235f86 + df2fbde commit b3314e5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

content/docs/error-boundaries.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Check out [this example of declaring and using an error boundary](https://codepe
7171

7272
## Where to Place Error Boundaries {#where-to-place-error-boundaries}
7373

74-
The granularity of error boundaries is up to you. You may wrap top-level route components to display a “Something went wrong” message to the user, just like server-side frameworks often handle crashes. You may also wrap individual widgets in an error boundary to protect them from crashing the rest of the application.
74+
The granularity of error boundaries is up to you. You may wrap top-level route components to display a “Something went wrong” message to the user, just like how server-side frameworks often handle crashes. You may also wrap individual widgets in an error boundary to protect them from crashing the rest of the application.
7575

7676

7777
## New Behavior for Uncaught Errors {#new-behavior-for-uncaught-errors}
@@ -130,7 +130,7 @@ Error boundaries **do not** catch errors inside event handlers.
130130

131131
React doesn't need error boundaries to recover from errors in event handlers. Unlike the render method and lifecycle methods, the event handlers don't happen during rendering. So if they throw, React still knows what to display on the screen.
132132

133-
If you need to catch an error inside event handler, use the regular JavaScript `try` / `catch` statement:
133+
If you need to catch an error inside an event handler, use the regular JavaScript `try` / `catch` statement:
134134

135135
```js{9-13,17-20}
136136
class MyComponent extends React.Component {

0 commit comments

Comments
 (0)