About loop #2571
Unanswered
callmeitachi
asked this question in
Q&A
About loop
#2571
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have the following code:
fn App() -> Element {
let mut alarm_data=use_signal(|| 1);
rsx! {
h1 {
"{alarm_data}"
}
button {
onclick:move |event| {
loop {
let mut i=1;
let b=alarm_data.take();
let c=b+i;
alarm_data.set(c);
thread::sleep(Duration::from_secs(2));
i+=1;
};
Can I have some way to implement it?
Beta Was this translation helpful? Give feedback.
All reactions