only subscribe scopes to signals when rendering

This commit is contained in:
Evan Almloff committed 2024-02-14 09:33:22 -06:00
1 parent 49f3b8235d
commit 48751d2f98
14 files changed
+424 -48

No files matched your search

-6
View File
@@ -315,12 +315,6 @@ impl ScopeId {
Runtime::with(|rt| rt.current_scope_id()).flatten()
}
#[doc(hidden)]
/// Check if the virtual dom is currently inside of the body of a component
pub fn vdom_is_rendering(self) -> bool {
Runtime::with(|rt| rt.rendering.get()).unwrap_or_default()
}
/// Consume context from the current scope
pub fn consume_context<T: 'static + Clone>(self) -> Option<T> {
Runtime::with_scope(self, |cx| cx.consume_context::<T>()).flatten()