docs: remove all usages of static closure syntax and update readme
This commit is contained in:
1 parent
d1560450ba
commit
cafb7df736
66 files changed
+792
-2019
No files matched your search
+7
-6
@@ -12,13 +12,14 @@ fn main() {
|
||||
fn app(cx: Scope) -> Element {
|
||||
let count = use_state(&cx, || 0);
|
||||
|
||||
use_future(&cx, || {
|
||||
for_async![count];
|
||||
use_future(&cx, move || {
|
||||
let count = UseState::for_async(&count);
|
||||
// for_async![count];
|
||||
async move {
|
||||
loop {
|
||||
tokio::time::sleep(Duration::from_millis(1000)).await;
|
||||
count += 1;
|
||||
}
|
||||
// loop {
|
||||
// tokio::time::sleep(Duration::from_millis(1000)).await;
|
||||
// count += 1;
|
||||
// }
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user