Tags as Values
Passing Components as Values
A SolidTypeComponent
can be passed as a value by wrapping it in the TagValue object. They can then be rendered into a tag by calling render.
let Comp = TagValue(MyComponent)Comp.render()
Operator Overloads
You can also use the !@
and %
Operator overloads to perform the above actions.
let Comp = !@MyComponent// a tagvalue can render the property set of an anonymous recordComp % {| ``class`` = "class" |}// a tagvalue can render the property set of any elementComp % div(class' = "class")
Last updated: 7/9/25, 7:54 PM