docs: even more docs

This commit is contained in:
Jonathan Kelley committed 2022-03-06 20:37:57 -05:00
1 parent a4ab2d9de0
commit 0f87ebb277
25 files changed
+986 -174

No files matched your search

+3 -3
View File
@@ -74,9 +74,9 @@ fn app(cx: Scope) -> Element {
class: "pure-button pure-button-primary",
onclick: move |_| {
clients.write().push(Client {
description: (**description).clone(),
first_name: (**firstname).clone(),
last_name: (**lastname).clone(),
description: description.to_string(),
first_name: firstname.to_string(),
last_name: lastname.to_string(),
});
description.set(String::new());
firstname.set(String::new());
+2 -2
View File
@@ -13,11 +13,11 @@ fn app(cx: Scope) -> Element {
let count = use_state(&cx, || 0);
use_future(&cx, (), move |_| {
let count = count.clone();
let mut count = count.clone();
async move {
loop {
tokio::time::sleep(Duration::from_millis(1000)).await;
count.modify(|f| f + 1);
count += 1;
}
}
});