Skip to main content

when

Function when 

Source
pub fn when<P: Piece>(
    cond: impl Fn() -> bool + 'static,
    build_arm: impl Fn() -> P + 'static,
) -> AnyPiece
Expand description

Reactive conditional subtree. The anchor is a layout-transparent group; the active arm lives in its own child scope, disposed on switch (§4.3).

Day API ↩ Guides· daybrite.dev