feat: use future fully figured out

This commit is contained in:
Jonathan Kelley committed 2022-02-21 15:39:47 -05:00
1 parent 86729d929d
commit 9211e1fc78
7 files changed
+481 -348

No files matched your search

+2 -2
View File
@@ -12,8 +12,8 @@ fn main() {
fn app(cx: Scope) -> Element {
let (count, set_count) = use_state(&cx, || 0);
use_future(&cx, move || {
let set_count = set_count.to_owned();
use_future(&cx, (), move |_| {
let set_count = set_count.clone();
async move {
loop {
tokio::time::sleep(Duration::from_millis(1000)).await;