Skip to contents

Define a case for Match()

Usage

Case(predicate, body)

Arguments

predicate

One of: a function \(v) cond of the bound value, a function \() cond ignoring the bound value (cross-cutting), or a literal value (matched against the bound value via identical()).

body

A function \(v) tag_tree or \() tag_tree that returns the tag tree to render when this case is active. The function is called fresh on each case activation — the active case's reactives and DOM are torn down on transition, so a tag tree captured outside the function would reference dead closures.

Value

A case definition (a list).