This commit is contained in:
Jonathan Kelley committed 2021-07-01 14:14:59 -04:00
1 parent c5f9cce63a
commit 952a91d540
18 files changed
+154 -48

No files matched your search

+8 -1
View File
@@ -21,7 +21,14 @@ pub fn html(s: TokenStream) -> TokenStream {
}
/// The html! macro makes it easy for developers to write jsx-style markup in their components.
/// We aim to keep functional parity with html templates.
/// ```
/// rsx! {
/// div {
/// class: "some special class"
/// h1 { "Children too" }
/// }
/// }
/// ```
#[proc_macro]
pub fn rsx(s: TokenStream) -> TokenStream {
match syn::parse::<rsx::RsxRender>(s) {
+1 -1
View File
@@ -105,7 +105,7 @@ impl ToTokens for RsxRender {
}),
// Otherwise we just build the LazyNode wrapper
None => out_tokens.append_all(quote! {
dioxus::prelude::LazyNodes::new(move |__cx|{
dioxus::prelude::LazyNodes::new(move |__cx: &NodeFactory|{
let bump = &__cx.bump();
#inner
})