Bladeren bron

restore readme.rs

Evan Almloff 1 jaar geleden
bovenliggende
commit
1c67585ba2
1 gewijzigde bestanden met toevoegingen van 0 en 13 verwijderingen
  1. 0 13
      examples/readme.rs

+ 0 - 13
examples/readme.rs

@@ -8,20 +8,7 @@ fn app() -> Element {
     let mut count = use_signal(|| 0);
 
     rsx! {
-        Child { count: "High-Five counter: {count}" }
-        Child { count: "count" }
         button { onclick: move |_| count += 1, "Up high!" }
         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()}" }
-    }
-}