Skip to main content

Interface: UseTimeoutControls

Defined in: use-timeout.ts:16

Controls returned by useTimeout. They keep the same identity across renders.

Properties​

cancel​

cancel: () => void

Defined in: use-timeout.ts:20

Stop the timer without calling the callback.

Returns​

void


isPending​

isPending: () => boolean

Defined in: use-timeout.ts:22

Whether the timer is running and the callback has not been called yet.

Returns​

boolean


start​

start: () => void

Defined in: use-timeout.ts:18

Start the timer, or restart it from the full delay if it is already running. Does nothing while delay is null.

Returns​

void