Facebook Inc. has released a new version of React, their very promising JavaScript Library for UI development. The new React v16.0 contains a number of updates and new features.
“We're excited to announce the release of React v16.0! Among the changes are some long-standing feature requests, including fragments, error boundaries, portals, support for custom DOM attributes, improved server-side rendering, and reduced file size.”
Though the documentation for most of the features has not been yet released, but according to the
React v16.0 GitHub download page, the following are the significant features added to this new version of the library.
- Components can now return arrays and strings from render.
- Improved error handling with introduction of "error boundaries". 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.
- First-class support for declaratively rendering a subtree into another DOM node with ReactDOM.createPortal().
- Streaming mode for server side rendering is enabled with ReactDOMServer.renderToNodeStream() and ReactDOMServer.renderToStaticNodeStream().
- React DOM now allows passing non-standard attributes.
Further information, such as - breaking changes, details of these new features, and download links, can be found at the
Official blog or on the
GitHub repository.