<p dir="auto">If you render</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;div&gt;
    &lt;span key={1}&gt;hello,&lt;/span&gt;
    &lt;span&gt;world&lt;/span&gt;
&lt;/div&gt;"><pre class="notranslate"><code class="notranslate">&lt;div&gt;
    &lt;span key={1}&gt;hello,&lt;/span&gt;
    &lt;span&gt;world&lt;/span&gt;
&lt;/div&gt;
</code></pre></div>
<p dir="auto">then React throws a duplicate-key error because the second span ("world") is assigned a key of <code class="notranslate">1</code>, its index in the div's children.</p>
<p dir="auto">Presumably it's best to simply avoid specifying only some keys but it would be nice if React could use separate namespaces for different key types (or at least provide a slightly more informative error message).</p>
<p dir="auto">Describe what you were doing when the bug occurred:<br>
1.<br>
2.<br>
3.</p>
<hr>
<h2 dir="auto">Please do not remove the text below this line</h2>
<p dir="auto">DevTools version: 4.2.1-3816ae7c3</p>
<p dir="auto">Call stack: at n.value (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:163226)<br>
at m (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:332702)<br>
at uc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:332919)<br>
at gi (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:59907)<br>
at el (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:68139)<br>
at jl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:108547)<br>
at Lc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:92715)<br>
at Pc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:92640)<br>
at wc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:89544)<br>
at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:46341</p>
<p dir="auto">Component stack: in uc<br>
in div<br>
in div<br>
in wo<br>
in Unknown<br>
in n<br>
in Unknown<br>
in div<br>
in div<br>
in Li<br>
in $e<br>
in dn<br>
in Ca<br>
in Pc</p>