React v16.2.0: Improved Support for Fragments

Last updated 1 year ago by Clement Hoang

react

React 16.2 is now available! The biggest addition is improved support for returning multiple children from a component’s render method. We call this feature fragments

What Are Fragments?

A common pattern is for a component to return a list of children. Take this example HTML:

Some text.
<h2>A heading</h2>
More text.
<h2>Another heading</h2>
Even more text.
Read full Article