浏览代码

restore readme.rs

Evan Almloff 1 年之前
父节点
当前提交
1c67585ba2
共有 1 个文件被更改,包括 0 次插入13 次删除
  1. 0 13
      examples/readme.rs

+ 0 - 13
examples/readme.rs

@@ -8,20 +8,7 @@ fn app() -> Element {
     let mut count = use_signal(|| 0);
     let mut count = use_signal(|| 0);
 
 
     rsx! {
     rsx! {
-        Child { count: "High-Five counter: {count}" }
-        Child { count: "count" }
         button { onclick: move |_| count += 1, "Up high!" }
         button { onclick: move |_| count += 1, "Up high!" }
         button { onclick: move |_| count -= 1, "Down low!" }
         button { onclick: move |_| count -= 1, "Down low!" }
     }
     }
 }
 }
-
-#[derive(Props, Clone, PartialEq)]
-struct ChildProps {
-    count: Option<String>,
-}
-
-fn Child(props: ChildProps) -> Element {
-    rsx! {
-        h1 { "{props.count.unwrap_or_default()}" }
-    }
-}