Switch()
ts
function Switch(__namedParameters): Element | null;Defined in: components/switch.tsx:60
Renders content based on a matching case.
This component behaves similarly to a switch-case statement. It resolves the given condition and renders the corresponding case.
Parameters
| Parameter | Type |
|---|---|
__namedParameters | SwitchProps |
Returns
Element | null
React Component
Remarks
- Supports primitive values (string, number, boolean)
- Supports variable-based conditions via VariableWithAccess
- Async resolution is handled via touchByAccess
- Falls back to
defaultif no case matches
Since
1.0.0
Author
your name