We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
spawn_forever
Problem spawn_forever tasks get attached to the scope
The task will never get executed because it's attached to the Scope, and the Scope is being dropped.
#[allow(non_snake_case)] fn Counter() -> Element { use_drop(move || { println!("spawning"); spawn_forever(async move { println!("running"); }); }); None } fn app() -> Element { let mut count = use_signal(|| 0); rsx!( Button { onclick: move |_| count += 1, label { "Increase" } } Button { onclick: move |_| count -= 1, label { "Decrease" } } for i in 0..count() { Counter { key: "{i}" } } ) }
Expected behavior
Work
Environment:
The text was updated successfully, but these errors were encountered:
ealmloff
Successfully merging a pull request may close this issue.
Problem
spawn_forever
tasks get attached to the scopeThe task will never get executed because it's attached to the Scope, and the Scope is being dropped.
Expected behavior
Work
Environment:
The text was updated successfully, but these errors were encountered: