add simple suspense methods
This commit is contained in:
11 files changed
+52
-189
No files matched your search
@@ -1,5 +1,5 @@
|
||||
use crate::{innerlude::SuspenseContext, ScopeId, TaskId, VirtualDom};
|
||||
use std::{rc::Rc, task::Context};
|
||||
use crate::{TaskId, VirtualDom};
|
||||
use std::task::Context;
|
||||
|
||||
impl VirtualDom {
|
||||
/// Handle notifications by tasks inside the scheduler
|
||||
@@ -27,10 +27,4 @@ impl VirtualDom {
|
||||
tasks.try_remove(id.0);
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn acquire_suspense_boundary(&self, id: ScopeId) -> Rc<SuspenseContext> {
|
||||
self.scopes[id]
|
||||
.consume_context::<Rc<SuspenseContext>>()
|
||||
.unwrap()
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user