# bloom-rsx Essentially, bloom-rsx implements rsx in a way that it just calls a builder-pattern based on the [builder-pattern](https://crates.io/crates/builder-pattern) crate. ## Tags Lower-case tags will be transformed to calls to a `tag` function that must be in scope (bloom-html provides one for `HtmlNode`s): ```rust rsx!(
) ``` will be transformed into (the equivalent of) ```rust tag("div") .attr("id", "foo") .on("click", || {}) .build() .into() ``` ## Children Children are passed after building the tag itself: ```rust rsx!(
) ``` is transformed to ```rust tag("div") .build() .children(vec![ tag("span").build().into() ]) ``` ## Text Text is just cast to the target node type using into: ```rust rsx!(
"foobar"
) ``` becomes ```rust tag("div") .build() .children(vec![ "foobar".into() ]) ``` ## Components Uppercase tags are transformed to a builder pattern: ```rust rsx!(
) ``` becomes ```rust MyComponent::new() .foo("bar") .children(vec![ tag("div").build().into() ]) .build() .into() ```