Jonathan Kelley 2b9c8d09d9 Feat: docs, code frm percy 4 years ago
..
src 2b9c8d09d9 Feat: docs, code frm percy 4 years ago
Cargo.toml 2b9c8d09d9 Feat: docs, code frm percy 4 years ago
README.md 2b9c8d09d9 Feat: docs, code frm percy 4 years ago

README.md

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);
}