Merge branch 'upstream' into optimize-templates-v3

This commit is contained in:
Evan Almloff committed 2022-12-07 18:29:02 -06:00
commit 99a4a9d45b
113 files changed
+347 -828

No files matched your search

+2 -1
View File
@@ -21,7 +21,8 @@ use std::{
/// }
/// ```
pub struct Event<T: 'static + ?Sized> {
pub(crate) data: Rc<T>,
/// The data associated with this event
pub data: Rc<T>,
pub(crate) propogates: Rc<Cell<bool>>,
}
+8
View File
@@ -514,6 +514,14 @@ impl<'a> IntoTemplate<'a> for VNode<'a> {
self
}
}
impl<'a> IntoTemplate<'a> for Element<'a> {
fn into_template(self, _cx: &'a ScopeState) -> VNode<'a> {
match self {
Ok(val) => val.into_template(_cx),
_ => VNode::empty().unwrap(),
}
}
}
impl<'a, 'b> IntoTemplate<'a> for LazyNodes<'a, 'b> {
fn into_template(self, cx: &'a ScopeState) -> VNode<'a> {
self.call(cx)