global.clearInterval
Cancels an id from setInterval or setTimeout, which share ids; undefined is ignored.
Usage
Start and stop a timer
import { Text, onMount, signal } from 'kuito';
export function ElapsedTime() {
const seconds = signal(0);
onMount(() => {
const timer = setInterval(() => seconds.value++, 1000);
return () => clearInterval(timer);
});
return <Text>{`${seconds.value} seconds on this screen`}</Text>;
}Signatures
(id: number | undefined): voidParameters
| Name | Type | Required | Description |
|---|---|---|---|
id | number | Yes | — |
Returns
void
Generated from the public TypeScript declarations: signatures, props and defaults come from the checked source, descriptions from its JSDoc. No defaults are invented.