feat: split apart template mutations

This commit is contained in:
Jonathan Kelley committed 2022-11-08 19:39:37 -08:00
1 parent 203935834d
commit fc9fe6e560
21 files changed
+431 -222

No files matched your search

+3 -2
View File
@@ -4,6 +4,7 @@ use futures_util::Future;
use crate::{
factory::{ComponentReturn, RenderReturn},
innerlude::Scoped,
scopes::{Scope, ScopeState},
Element,
};
@@ -69,10 +70,10 @@ impl<'a, P, A, F: ComponentReturn<'a, A>> AnyProps<'a> for VComponentProps<'a, P
// Make sure the scope ptr is not null
// self.props.state.set(scope);
let scope = Scope {
let scope = cx.bump().alloc(Scoped {
props: unsafe { &*self.props },
scope: cx,
};
});
// Call the render function directly
(self.render_fn)(scope).as_return(cx)