fix spreading attributes

This commit is contained in:
Evan Almloff committed 2024-01-16 11:04:37 -06:00
1 parent d44b0b34c8
commit 8d14671520
5 files changed
+8 -55

No files matched your search

+3 -1
View File
@@ -139,7 +139,9 @@ impl Parse for BodyNode {
impl ToTokens for BodyNode {
fn to_tokens(&self, tokens: &mut TokenStream2) {
match &self {
BodyNode::Element(el) => el.to_tokens(tokens),
BodyNode::Element(_) => {
unimplemented!("Elements are statically created in the template")
}
BodyNode::Component(comp) => comp.to_tokens(tokens),
BodyNode::Text(txt) => tokens.append_all(quote! {
dioxus_core::DynamicNode::Text(dioxus_core::VText::new(#txt))