Feat: listeners now have scope information

This commit is contained in:
Jonathan Kelley committed 2021-03-03 11:13:46 -05:00
1 parent cb74d70f83
commit fcd68e61d2
17 files changed
+897 -906

No files matched your search

+2 -2
View File
@@ -22,12 +22,12 @@ fn app(ctx: Context, props: &Props) -> DomTree {
let (f, setter) = use_state(&ctx, || 0);
ctx.render(move |b| {
let mut root = builder::div(b);
let mut root = builder::ElementBuilder::new(b, "div");
for child in &props.items {
// notice that the child directly borrows from our vec
// this makes lists very fast (simply views reusing lifetimes)
root = root.child(builder::virtual_child(
b,
b.bump,
ChildProps {
item: child,
item_handler: setter,