Evan Almloff il y a 3 ans
Parent
commit
f703347936
2 fichiers modifiés avec 5 ajouts et 3 suppressions
  1. 4 2
      examples/hot_reload.rs
  2. 1 1
      packages/rsx_interperter/src/interperter.rs

+ 4 - 2
examples/hot_reload.rs

@@ -23,9 +23,11 @@ fn app(cx: Scope) -> Element {
             width: format!("{}px", count),
             background_color: "#999999",
             onclick: move |_| {
-                count.modify(|count| *count + 1);
+                count.modify(|count| *count + 10);
             },
-            "High-Five counter: {count}",
+            p{
+                "High-Five counter: {count}",
+            }
             Comp{
                 color: "#083289"
             }

+ 1 - 1
packages/rsx_interperter/src/interperter.rs

@@ -210,7 +210,7 @@ fn build_node<'a>(
                     listeners,
                     attributes.as_slice(),
                     children.as_slice(),
-                    Some(format_args!("{}", key)),
+                    None,
                 ))
             } else {
                 None