facebook/react — pull request #2376 by leebyron (2014-10-18 09:22:31+00:00)
Title: Allow iterables in traverseAllChildren

This lets you use any kind of iterable as a container of react child elements. It also preserves keys when possible if the iterable is keyed.

* Use an ES6 Map or Set to hold children.
* Use an Immutable-js collection to hold children.
* Use a function* which yields children.

Concretely, this removes the necessary conversion to JS objects if you're mapping over Immutable-js collections to get children, i.e.:

```

{myImmutable.map(val => {val}).toJS()

```

Now we can remove the `toJS()` and the intermediate allocation along with it.