html-node-macro 0.1.2

A html to node macro powered by rstml.
Documentation

html-node

A HTML to node macro powered by rstml.

let grocery_list = vec!["milk", "eggs", "bread"];

html! {
    <div>
        <h1>Shopping List</h1>
        <ul>
            { grocery_list.into_iter().zip(1..).map(|(item, i)| html! {
                <li class="item">
                    <input type="checkbox" id={format!("item-{i}")}>
                    <label for={format!("item-{i}")}>{text!("{item}")}</label>
                </li>
            }) }
        </ul>
    </div>
};