Skip to content

Iterators Exercise

Micah Godbolt edited this page Oct 20, 2018 · 4 revisions

The Template

Now that we have a List component, we can start using it in our application to render out all of our Todos. Let's have you jump in and do the implementation.

$ git checkout 04-exercise

  1. Add a <List> component inside of the <main> tag.
  2. Pass the todos in as the List's :data prop.
  3. Insert a <template> tag with slot of "item" like <template slot="item">
  4. Set the slot-scope of template to {item}. like slot-scope="{item}"
  5. Add the TodoItem component inside the <template> and pass "item" in as the :todo prop
  6. TodoItem has two emits, doneEdit and removeTodo. Set those to their matching methods like @doneEdit="doneEdit"