title: alpine.js - button in loop / click multiple times fired
body: <p>I am new to alpine.js and have a strange behaviour. What am i doing wrong?
  The button action "removePerson()" is always executed twice. I have no idea - why ?</p>
  
  <pre><code>&lt;template x-for="(person, i) in persons" :key="i"&gt;
    &lt;div class="mt-3"&gt;
      &lt;label&gt;Name &lt;span x-text="i"&gt;&lt;/span&gt;&lt;/label&gt;
      &lt;div class="input-group"&gt;
        &lt;input type="text" class="form-control" placeholder="Namen eingeben" x-model="person.name"&gt;
        &lt;template x-if="i &lt;= persons.length"&gt;
          &lt;div class="input-group-append"&gt;
            &lt;span class="input-group-text"&gt;
              &lt;button type="button" @click.prevent="removePerson(i)" class="btn btn-primary"&gt;remove&lt;/button&gt;
            &lt;/span&gt;
          &lt;/div&gt;
        &lt;/template&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/template&gt;
  </code></pre>
  
  <p>More in detail:
  <a href="https://codepen.io/derrobert/pen/Yzypzej" rel="nofollow noreferrer">https://codepen.io/derrobert/pen/Yzypzej</a></p>