title: How to setup multiple keys for components in template tag using v-for?
body: <p>I wanted to render a list using v-for. It's simple enough, the documentation explains almost every use case. I want it to look like that:</p>
  
  <pre><code>&lt;template v-for="(item, index) in items" :key="index"&gt;
        &lt;CustomComponent :item="item"/&gt;
        &lt;Separator v-if="index !== items.length-1"/&gt;
  &lt;/template&gt;
  </code></pre>
  
  <p>Unfortunately, the documentation does not say how to set a key for multiple custom components in one v-for.</p>
  
  <p>Obviously, I don't want to include separator to my custom component, because it is used in other places too. Code I have pasted is generating those errors:
  <code>'template' cannot be keyed. Place the key on real elements instead.</code>
  I can set a key on component and separator using an index but I got errors: <code>Duplicate keys detected: 'x'. This may cause an update error.</code></p>
  
  <p>For now, I'm doing it like that but it's an ugly hack and would not work with more components in one template.</p>
  
  <pre><code>&lt;template v-for="(item, index) in items"&gt;
        &lt;CustomComponent :item="item" :key="(index+1)*-1"/&gt;
        &lt;Separator v-if="index !== items.length-1" :key="(index+1)"/&gt;
  &lt;/template&gt;
  </code></pre>
  
  <p>Example from documentation explains templates on the list with basic components which does not require keys.
  Does anyone know how should I do it correctly?</p>
  
  <p>Ps. It is not recommended to use v-if on v-for. Could someone suggest how to change my code not to use v-if but don't render separator under the last element?</p>