fix: exampels

This commit is contained in:
Jonathan Kelley committed 2022-01-25 21:41:40 -05:00
1 parent 5c4bd0881b
commit a8952a9ee8
14 files changed
+400 -285

No files matched your search

+2 -2
View File
@@ -9,7 +9,7 @@ fn main() {
}
fn app(cx: Scope) -> Element {
let contents = use_state(&cx, || {
let (contents, set_contents) = use_state(&cx, || {
String::from("<script>alert(\"hello world\")</script>")
});
@@ -20,7 +20,7 @@ fn app(cx: Scope) -> Element {
input {
value: "{contents}",
r#type: "text",
oninput: move |e| contents.set(e.value.clone()),
oninput: move |e| set_contents(e.value.clone()),
}
}
})