dom

Macro dom 

Source
dom!() { /* proc-macro */ }
Expand description

Parse a string into virtual_dom::DomNode’s with minimal variable interpolation

Because of the nature of macros whitespace is fairly arbitrary and might spawn spaces or newlines in between text one way to prevent this it to explicitly add quotes around your text.

eg.

use proc_virtual_dom::dom;
dom!(<div>" This is my text with preserved whitespace "</div>);

§Examples

use proc_virtual_dom::dom;
let title = "My beautiful website";
let content = dom! {
    <div>{title}</div>
};