dioxus/packages/html-macro
2021-01-19 08:50:56 -05:00
..
src Feat: WIP 2021-01-14 20:56:28 -05:00
Cargo.toml Chore: cleanup the CLI package 2021-01-19 08:50:56 -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);
}