define_html_macro!() { /* proc-macro */ }Expand description
Creates a custom html! macro with the given settings.
The generated html! macro calls html_with_config under the hood.
// This creates a macro called `my_html!`
define_html_macro! {
/// This documentation comment will get added to the generated `my_html!` macro.
my_html!
real_dom = (),
// Optionally configure the path to the underlying macro to call.
calls = html_macro::html_with_config,
};
// `my_html!` can now be used to create `VirtualNode`s.
let node: VirtualNode<()> = my_html! { <div>hello world</div> };