@samitouri / QOS-React / commits / 759690f7b2

Replace "children (and grandchildren)" with "descendants" (#10297)

Daniel Lo Nigro committed Jul 27, 2017 at 02:23 UTC 759690f7b2becc8f70139265bb098145fd6429cf
1 file changed +2 -2
docs/_posts/2017-07-26-error-handling-in-react-16.md
+2 -2
@@ -15,7 +15,7 @@ In the past, JavaScript errors inside components used to corrupt React’s inter
15
16 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”.
17
18 -Error boundaries are React components that **catch JavaScript errors in their children (and grandchildren), 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.
18 +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.
19
20 A class component becomes an error boundary if it defines a new lifecycle method called `componentDidCatch(error, info)`:
21
@@ -97,4 +97,4 @@ Error boundaries preserve the declarative nature of React, and behave as you wou
97
98 ## Naming Changes from React 15
99
100 -React 15 included a very limited support for error boundaries under a different method name: `unstable_handleError`. This method no longer works, and you will need to change it to `componentDidCatch` in your code starting from the first 16 beta release.
\ No newline at end of file
100 +React 15 included a very limited support for error boundaries under a different method name: `unstable_handleError`. This method no longer works, and you will need to change it to `componentDidCatch` in your code starting from the first 16 beta release.