bloom-rsx
Essentially, bloom-rsx implements rsx in a way that it just calls a builder-pattern based on the 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 HtmlNodes):
rsx!
will be transformed into (the equivalent of)
tag
.attr
.on
.build
.into
Children
Children are passed after building the tag itself:
rsx!
is transformed to
tag
.build
.children
Text
Text is just cast to the target node type using into:
rsx!
becomes
tag
.build
.children
Components
Uppercase tags are transformed to a builder pattern:
rsx!
becomes
new
.foo
.children
.build
.into