-
Notifications
You must be signed in to change notification settings - Fork 6
Iterators Exercise
Micah Godbolt edited this page Oct 20, 2018
·
4 revisions
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
- Add a
<List>
component inside of the<main>
tag. - Pass the
todos
in as the List's:data
prop. - Insert a
<template>
tag withslot
of "item" like<template slot="item">
- Set the
slot-scope
of template to{item}
. likeslot-scope="{item}"
- Add the TodoItem component inside the
<template>
and pass "item" in as the:todo
prop - TodoItem has two emits,
doneEdit
andremoveTodo
. Set those to their matching methods like@doneEdit="doneEdit"