ReviewOS

stacks/stx

signals: add x-else / x-else-if (and :else / :else-if) — reactive conditional chains

#1734
Closed glennmichael123 opened this 9 days ago ·
9 days ago

Gap

x-if / :if / @if (used as element attributes, processed by signals.js's bindIf) are the reactive conditional directive family. They subscribe to signals, re-evaluate on change, and add/remove the element from the DOM accordingly. They've been the right tool for "show this badge when count > 0," "render this banner while loading," etc.

Their else counterparts don't exist. Grep the entire signals.js for bindElse, x-else, :else,