Feat: move the rsx macro around

This commit is contained in:
Jonathan Kelley committed 2021-06-03 10:42:28 -04:00
1 parent 1919f88f03
commit 50c8b93aad
23 files changed
+886 -617

No files matched your search

+9 -2
View File
@@ -725,8 +725,10 @@ impl<'src, T> Context<'src, T> {
}
/// Create a subscription that schedules a future render for the reference component
pub fn schedule_update(&self) -> impl Fn() -> () + 'static {
self.scope.event_queue.schedule_update(&self.scope)
pub fn schedule_update(&self) -> Rc<dyn Fn() + 'static> {
todo!()
// pub fn schedule_update(self) -> impl Fn() + 'static {
// self.scope.event_queue.schedule_update(&self.scope)
}
// /// Create a suspended component from a future.
@@ -765,6 +767,7 @@ impl<'src, T> Context<'src, T> {
self,
// &'a/ self,
lazy_nodes: LazyNodes<'src, F>,
// lazy_nodes: LazyNodes<'src, F>,
) -> VNode<'src> {
let ctx = NodeCtx {
scope_ref: self.scope,
@@ -961,6 +964,10 @@ impl<'src, P> Context<'src, P> {
}
}
pub trait OpaqueScope {
fn get_scope(&self) -> &Scope;
}
// ==================================================================================
// Supporting structs for the above abstractions
// ==================================================================================