signal
A signal. Made while a component sets up, it belongs to that component's slot: it keeps its value across Live Patches and goes when the component unmounts. Made anywhere else, it is a signal of its own, which every component that reads it shares.
Usage
Announce changing status
import { Text, signal } from 'kuito';
export function Status() {
const status = signal('Uploading…');
return <Text live="polite">{status.value}</Text>;
}Signatures
<T>(initial: T, name?: string): Signal<T>Type parameters
| Name | Constraint | Default |
|---|---|---|
T | — | — |
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
initial | T | Yes | — |
name | string | No | — |
Returns
Signal<T>
Generated from the public TypeScript declarations: signatures, props and defaults come from the checked source, descriptions from its JSDoc. No defaults are invented.