Merge pull request #1993 from DioxusLabs/fix-effect

Fix effect ordering and futures being run after scopes are dropped
This commit is contained in:
Jonathan Kelley authored and GitHub committed 2024-03-05 11:18:17 -08:00
commit 608fec59e5
16 files changed
+496 -136

No files matched your search

+1 -2
View File
@@ -3,7 +3,7 @@ use crate::{
ReadOnlySignal, ReadableRef,
};
use dioxus_core::{
prelude::{flush_sync, spawn, IntoAttributeValue},
prelude::{spawn, IntoAttributeValue},
ScopeId,
};
use generational_box::{AnyStorage, Storage, SyncStorage, UnsyncStorage};
@@ -107,7 +107,6 @@ impl<T: PartialEq + 'static> Signal<T> {
spawn(async move {
loop {
flush_sync().await;
rc.changed().await;
let new = f();
if new != *state.peek() {