title: What causes this component was created without expected prop error in my Svelte app?
body: <p>I am working on a small Todo app in Svelte for learning purposes (Im new to Svelte).</p>
  <p>In App.svelte I import the <code>TodoItem</code> component loop a <code>todos</code>array:</p>
  <pre><code>import TodoItem from './TodoItem.svelte';
  //more code
  
  {#each todos as t, index}&lt;TodoItem t/&gt;{/each}
  </code></pre>
  <p>In <code>TodoItem.svelte</code> I  have:</p>
  <pre><code>&lt;script&gt;
      import { createEventDispatcher } from 'svelte';
      export let index;
      export let t;
      export let id;
      export let title;
      export let completed;
      
      //more code here
  &lt;/script&gt;
  
  &lt;tr&gt;
      &lt;td&gt;{index + 1}&lt;/td&gt;
      &lt;td class=&quot;{t.completed == true ? 'completed' : ''}&quot;&gt;{t.title}&lt;/td&gt;
      &lt;td class=&quot;text-center&quot;&gt;&lt;input type=&quot;checkbox&quot; checked=&quot;{t.completed}&quot; on:change={completeTodo(t.id)}&gt;&lt;/td&gt;
      &lt;td class=&quot;text-right&quot;&gt;
          &lt;div class=&quot;btn-group&quot;&gt;
              &lt;button on:click=&quot;{() =&gt; editTodo(t.id)}&quot; class=&quot;btn btn-sm btn-primary&quot;&gt;Edit&lt;/button&gt;
              &lt;button on:click=&quot;{deleteTodo(t.id)}&quot; class=&quot;btn btn-sm btn-danger&quot;&gt;Delete&lt;/button&gt;
          &lt;/div&gt;
      &lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>
  <p>In the console I get errors like this one <code>&quot;&lt;TodoItem&gt; was created without expected prop 'index'&quot;</code>, as this <strong><a href="https://svelte.dev/repl/12cb6530a9bd46729751762e9979b610?version=3.23.2" rel="nofollow noreferrer">REPL</a></strong> shows.</p>
  <h3>UPDATE</h3>
  <p>I replaced <code>{#each todos as t, index}&lt;TodoItem t/&gt;{/each}</code> with <code>{#each todos as t, index}&lt;TodoItem t index={index} id={t.id} title={t.title} completed=false /&gt;{/each}</code> but I still get <code>undefined</code> for the title.</p>
  <p>What is missing?</p>