We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 802aa60 commit 87fb3c9Copy full SHA for 87fb3c9
examples/02-todo/src/lib.rs
@@ -110,19 +110,23 @@ impl Component for TaskList {
110
fn render(&self) -> VNode {
111
h!(div[."task-list"]).build(c![
112
//
113
- h!(ul).build(c![
114
- ..self.tasks.value().iter().enumerate().map(
115
- |(i, (done, description))| {
+ h!(ul).build(
+ self
+ .tasks
116
+ .value()
117
+ .iter()
118
+ .enumerate()
119
+ .map(|(i, (done, description))| {
120
TaskItem {
121
id: i,
122
description: description.clone(),
123
done: *done,
124
on_change: self.on_change.clone(),
125
}
126
.build_with_key(Some(&i.to_string()))
- }
- )
- ])
127
+ })
128
+ .collect()
129
+ )
130
])
131
132
0 commit comments