Macro mogwai::html

source ·
html!() { /* proc-macro */ }
Expand description

Uses an html description to construct a ViewBuilder.

Looks like real HTML, but some editors have a hard time formatting the mixture of Rust and HTML. If that seems to be the case, try converting to rsx!, which editors tend to format well.

let my_div = mogwai_dom::html! {
    <div id="main">
        <p>"Trolls are real"</p>
    </div>
};