Switch
Overview​
- This component is the wrapper for the matching cases.
- The only required prop is its
children
. - Valid
children
are:With
,When
, andOtherwise
. - If you plan on having
With
cases, then you need to pass avalue
prop. - You are required to have at least one
Otherwise
component as children. - Just like
Match
, but it will return only the first match.