subscribe
subscribe(
listener): () =>void
Defined in: clock.ts:58
useSyncExternalStore-compatible subscribe. Adds the listener, lazily starts the interval if this is the first subscriber, and returns the teardown that removes the listener and (if it was the last) stops the interval.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
listener | Listener |
Returns
Section titled “Returns”() => void