> For the complete documentation index, see [llms.txt](https://ploegert.gitbook.io/til/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ploegert.gitbook.io/til/programmy/javascript/render-an-array-of-elements-with-react-16.md).

# Render An Array Of Elements With React 16

[React 16 was released today](https://facebook.github.io/react/blog/2017/09/26/react-v16.0.html). Among many exciting features and updates is support for rendering an array of elements.

This can look as simple as this example:

```javascript
return [
  <li key="1">One</li>,
  <li key="2">Two</li>,
  <li key="3">Three</li>
];
```

It really shines in the case of generating elements from an array of data.

```javascript
let data = [
  { value: "One", key: "1" },
  { value: "Two", key: "2" },
  { value: "Three", key: "3" }
];
return data.map(item => {
  return (
    <li key={item.key}>
      {item.value}
    </li>
  );
});
```

No need to wrap the result in a `<div>`!

[source](https://facebook.github.io/react/docs/react-component.html#render)
