@tempots/dom
When() function
Renders content conditionally based on a boolean value.
Signature:
When: (condition: Value<boolean>, then: TNode, otherwise?: TNode) => Renderable
Parameters
Parameter |
Type |
Description |
---|---|---|
condition |
The condition to evaluate | |
then |
Content to render if condition is true | |
otherwise |
(Optional) Optional content to render if condition is false |
Returns: Renderable
Renderable content