<Match/><Match/> is a branch for <Switch/>: it
carries a when condition and the children to render. By itself
Match is an identity component — its job is to carry the when and
children props that Switch reads. Like
<Show/>, when its child is a function it is
invoked with the matched value (reactively).
| name | type | description |
|---|---|---|
when |
any | once when becomes truthy, it will show its children. A <Match/> without when becomes the implicit fallback when no other branch matches. |
A <Match/> without when becomes the implicit fallback inside
<Switch/> — equivalent to setting the Switch
fallback prop. See the <Switch/> examples
for matching, default branches, and discriminated unions.