dioxus/packages/html-macro
Jonathan Kelley ce34d0dfcd Feat: WIP
2021-01-14 20:56:28 -05:00
..
src Feat: WIP 2021-01-14 20:56:28 -05:00
Cargo.toml Feat: docs, code frm percy 2021-01-14 02:56:41 -05:00
README.md Feat: docs, code frm percy 2021-01-14 02:56:41 -05:00

html-macro

use html_macro::*;

fn main () {
    let component = html! { <div id='component'>Some component</div> };

    let text_var = "You can interpolate text variables";

    let html = html! {
       <div onclick=|_ev: web_sys::MouseEvent| {}>
          You can type text right into the elements
          { component }
          { text_var }
       </div>
    };
    println!("{}", node);
}