Why doesn't ReactJS autogenerate keys for dynamic children?
<p>When coding ReactJS I have to supply keys for dynamic children. For example:</p>

<pre><code>render() {
  const {options} = this.state
  const availableOptions = options.map(opt =&gt; {
    return (
      &lt;option key={opt.id} value={opt.id}&gt;{opt.displayValue}&lt;/option&gt;}
    )
  }

  return (
    &lt;select onChange={this._onOptionSelect}&gt;
      {availableOptions}
    &lt;/select&gt;
  )
}
</code></pre>

<p>I understand why they keys are there. But why do <strong>I</strong> have to give them? Couldn't react just assign a running number or UUIDv4 or something else?</p>

<p>Related doc: <a href="http://facebook.github.io/react/docs/multiple-components.html#dynamic-children">http://facebook.github.io/react/docs/multiple-components.html#dynamic-children</a></p>