BranchChildren
Children, or a callback receiving the truthy when value.
Verwendung
Select one of several states
Dieser Typ wird verwendet von Match
import { Match, Switch, Text, signal } from 'kuito';
export function Status() {
const state = signal<'loading' | 'offline' | 'ready'>('loading');
return (
<Switch fallback={<Text>Ready</Text>}>
<Match when={state.value === 'loading'}>
<Text>Loading…</Text>
</Match>
<Match when={state.value === 'offline'}>
<Text>Check your connection</Text>
</Match>
</Switch>
);
}Typdeklaration
export type BranchChildren<T> = KuitoNode | ((value: Truthy<T>) => KuitoNode);Typ
KuitoNode | ((value: Truthy<T>) => KuitoNode)Generiert aus den öffentlichen TypeScript-Deklarationen: Signaturen, Props und Standardwerte stammen aus der geprüften Quelle, Beschreibungen aus deren JSDoc. Kein Standardwert ist erfunden.