r/programming • • Sep 26 '17

React v16.0 Released

https://facebook.github.io/react/blog/2017/09/26/react-v16.0.html
160 Upvotes

42 comments sorted by

View all comments

41

u/DoListening Sep 26 '17

Better error handling

...

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.

...

In addition to the error message and the JavaScript stack, it also provides component stack traces. Now you can see where exactly in the component tree the failure has happened

Awesome ๐Ÿ™Œ!

2

u/Gavvster Sep 27 '17

The array and string return syntax looks pretty handy as well, will be even better when you donโ€™t have to explicitly set keys for elements in returned arrays.