wip: stack-based "real child iterator"

This commit is contained in:
Jonathan Kelley committed 2021-06-26 03:06:29 -04:00
1 parent 0826fdfee1
commit 895cc0142b
6 files changed
+356 -121

No files matched your search

+6 -1
View File
@@ -336,7 +336,8 @@ impl VirtualDom {
}
pub fn base_scope(&self) -> &Scope {
todo!()
let idx = self.base_scope;
self.components.try_get(idx).unwrap()
}
}
@@ -578,6 +579,10 @@ impl Scope {
pub fn cur_frame(&self) -> &BumpFrame {
self.frames.cur_frame()
}
pub fn root<'a>(&'a self) -> &'a VNode<'a> {
&self.frames.cur_frame().head_node
}
}
/// Components in Dioxus use the "Context" object to interact with their lifecycle.