feat: context api overhaul

This commit is contained in:
Jonathan Kelley committed 2022-12-02 16:24:49 -08:00
1 parent 11a45c8ef0
commit a61daf220d
44 files changed
+812 -621

No files matched your search

+5 -1
View File
@@ -1,9 +1,13 @@
use crate::{
factory::RenderReturn, nodes::VNode, virtual_dom::VirtualDom, AttributeValue, DynamicNode,
nodes::RenderReturn, nodes::VNode, virtual_dom::VirtualDom, AttributeValue, DynamicNode,
ScopeId,
};
use bumpalo::boxed::Box as BumpBox;
/// An Element's unique identifier.
///
/// `ElementId` is a `usize` that is unique across the entire VirtualDOM - but not unique across time. If a component is
/// unmounted, then the `ElementId` will be reused for a new component.
#[cfg_attr(feature = "serialize", derive(serde::Serialize, serde::Deserialize))]
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
pub struct ElementId(pub usize);