<h3 dir="auto">What problem does this feature solve?</h3>
<p dir="auto">Currently, adding one of Map, Set, WeakMap, WeakSet as a data attribute of a Vue component will mean there. Vue should do the same as it does with Array and patch methods like add() and remove()</p>
<p dir="auto">Adding this feature solves the problem of for example being able to store unique lists of anything (Sets) or maps with structures as keys (since object keys always behave as strings).</p>
<p dir="auto">The expected behaviour is that when add() does not actually modify a set, nothing would be triggered.</p>
<p dir="auto">It's possible there is no good use for WeakMap, WeakSet. In that case there's no need to add these too.</p>
<h3 dir="auto">What does the proposed API look like?</h3>
<p dir="auto">There's no change in the API from a user perspective. There would need to be documentation that Vue does basically the</p>
<h3 dir="auto">What problem does this feature solve?</h3>
<p dir="auto">If a key is not supplied in v-for, there will be a warning linking to the docs (which is helpful). However if Vue really just needs a unique ID so it can keep track of the elements, and the developer doesn't need a key, then Vue should just create it's own key to use rather than warning the developer.</p>
<p dir="auto">Often items I have in a v-for don't really have any unique identifiers that would be good to use for a key, so I'm left with doing janky things to create a unique key, which seems brittle since unique identifier generation is a non-trivial problem. Someone proposed using something like <a href="https://github.com/ericelliott/cuid">https://github.com/ericelliott/cuid</a> to do it, but I though, why not just have Vue do it for me under the hood?</p>
<h3 dir="auto">What does the proposed API look like?</h3>
<p dir="auto">Current API:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;div v-for=&quot;item in items&quot; :key=&quot;item.id&quot;&gt;
  &lt;!-- content --&gt;
&lt;/div&gt;"><pre class="notranslate"><code class="notranslate">&lt;div v-for="item in items" :key="item.id"&gt;
  &lt;!-- content --&gt;
&lt;/div&gt;
</code></pre></div>
<p dir="auto">Current API which results in a warning:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;div v-for=&quot;item in items&quot;&gt;
  &lt;!-- content --&gt;
&lt;/div&gt;"><pre class="notranslate"><code class="notranslate">&lt;div v-for="item in items"&gt;
  &lt;!-- content --&gt;
&lt;/div&gt;
</code></pre></div>
<p dir="auto">Proposed API which will not result in a warning:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;div v-for=&quot;item in items&quot;&gt;
  &lt;!-- content --&gt;
&lt;/div&gt;"><pre class="notranslate"><code class="notranslate">&lt;div v-for="item in items"&gt;
  &lt;!-- content --&gt;
&lt;/div&gt;
</code></pre></div>