From 6424ad3390891b47854cfded6491d8fd79d9eb42 Mon Sep 17 00:00:00 2001 From: Leo dev Date: Sat, 1 Nov 2025 16:58:10 +0100 Subject: [PATCH] Small change in iter --- examples/iter.rs | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/examples/iter.rs b/examples/iter.rs index 9661634..61162ca 100644 --- a/examples/iter.rs +++ b/examples/iter.rs @@ -16,23 +16,15 @@ pub fn app(screen: Arc) -> Rsx { let count = use_state(1); run! { - ref count { + ref count, items { loop { - if count.get_dl() == 20 { - break; - } - std::thread::sleep(std::time::Duration::from_millis(200)); + items.get().push(count.get_dl()); **count.get() += 1; + std::thread::sleep(std::time::Duration::from_millis(100)); } } } - run! { - use count ref items { - items.get().push(count.get_dl()); - } - } - rsx! { @AlwaysFocused; @Handler::new({