mirror of
https://github.com/leptos-rs/leptos
synced 2024-11-10 06:44:17 +00:00
fix Suspense to use the old, Effect-like scheduling after fixing RenderEffect
This commit is contained in:
parent
20db2094a0
commit
49aa5179af
1 changed files with 3 additions and 3 deletions
|
@ -13,7 +13,7 @@ use reactive_graph::{
|
||||||
effect::RenderEffect,
|
effect::RenderEffect,
|
||||||
owner::{provide_context, use_context, Owner},
|
owner::{provide_context, use_context, Owner},
|
||||||
signal::ArcRwSignal,
|
signal::ArcRwSignal,
|
||||||
traits::{Get, Read, Track, With},
|
traits::{Dispose, Get, Read, Track, With},
|
||||||
};
|
};
|
||||||
use slotmap::{DefaultKey, SlotMap};
|
use slotmap::{DefaultKey, SlotMap};
|
||||||
use tachys::{
|
use tachys::{
|
||||||
|
@ -277,7 +277,7 @@ where
|
||||||
futures::channel::oneshot::channel::<()>();
|
futures::channel::oneshot::channel::<()>();
|
||||||
|
|
||||||
let mut tasks_tx = Some(tasks_tx);
|
let mut tasks_tx = Some(tasks_tx);
|
||||||
let eff = reactive_graph::effect::RenderEffect::new_isomorphic({
|
let eff = reactive_graph::effect::Effect::new_isomorphic({
|
||||||
move |_| {
|
move |_| {
|
||||||
tasks.track();
|
tasks.track();
|
||||||
if tasks.read().is_empty() {
|
if tasks.read().is_empty() {
|
||||||
|
@ -337,7 +337,7 @@ where
|
||||||
}
|
}
|
||||||
children = children => {
|
children = children => {
|
||||||
// clean up the (now useless) effect
|
// clean up the (now useless) effect
|
||||||
drop(eff);
|
eff.dispose();
|
||||||
|
|
||||||
Some(OwnedView::new_with_owner(children, owner))
|
Some(OwnedView::new_with_owner(children, owner))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue