fix: remove nodes is in a happier state

This commit is contained in:
Jonathan Kelley committed 2022-01-31 02:33:16 -05:00
1 parent cbd471fa46
commit 11f6b93889
6 files changed
+54 -34

No files matched your search

+4
View File
@@ -184,6 +184,7 @@ impl Debug for VNode<'_> {
}
VNode::Component(comp) => s
.debug_struct("VNode::VComponent")
.field("name", &comp.fn_name)
.field("fnptr", &comp.user_fc)
.field("key", &comp.key)
.field("scope", &comp.scope)
@@ -390,6 +391,7 @@ pub struct VComponent<'src> {
pub scope: Cell<Option<ScopeId>>,
pub can_memoize: bool,
pub user_fc: FcSlot,
pub fn_name: &'static str,
pub props: RefCell<Option<Box<dyn AnyProps + 'src>>>,
}
@@ -540,6 +542,7 @@ impl<'a> NodeFactory<'a> {
component: fn(Scope<'a, P>) -> Element,
props: P,
key: Option<Arguments>,
fn_name: &'static str,
) -> VNode<'a>
where
P: Properties + 'a,
@@ -550,6 +553,7 @@ impl<'a> NodeFactory<'a> {
can_memoize: P::IS_STATIC,
user_fc: component as *mut std::os::raw::c_void,
originator: self.scope.scope_id(),
fn_name,
props: RefCell::new(Some(Box::new(VComponentProps {
// local_props: RefCell::new(Some(props)),
// heap_props: RefCell::new(None),