mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-24 20:53:08 +00:00
Reword further
This commit is contained in:
@@ -15,7 +15,7 @@ In the past, JavaScript errors inside components used to corrupt React’s inter
|
||||
|
||||
A JavaScript error in a part of the UI shouldn’t break the whole app. To solve this problem for React users, React 16 introduces a new concept of an “error boundary”.
|
||||
|
||||
Error boundaries are React components that **catch JavaScript errors in their descendants, log those errors, and display a fallback UI** instead of the component tree that crashed. Error boundaries catch errors during rendering, in lifecycle methods, and in constructors of the whole tree below them.
|
||||
Error boundaries are React components that **catch JavaScript errors anywhere in their child component tree, log those errors, and display a fallback UI** instead of the component tree that crashed. Error boundaries catch errors during rendering, in lifecycle methods, and in constructors of the whole tree below them.
|
||||
|
||||
A class component becomes an error boundary if it defines a new lifecycle method called `componentDidCatch(error, info)`:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user