Skip to main content

Interface: UseStableCallback()

Defined in: use-stable-callback.ts:12

The signature of useStableCallback: the wrapped function keeps its type, and gains undefined in its return type when callback can be null or undefined.

Call Signature​

UseStableCallback<T>(callback): T

Defined in: use-stable-callback.ts:13

The signature of useStableCallback: the wrapped function keeps its type, and gains undefined in its return type when callback can be null or undefined.

Type Parameters​

T​

T extends AnyFunction

Parameters​

callback​

T

Returns​

T

Call Signature​

UseStableCallback<T>(callback): (...args) => ReturnType<T> | undefined

Defined in: use-stable-callback.ts:14

The signature of useStableCallback: the wrapped function keeps its type, and gains undefined in its return type when callback can be null or undefined.

Type Parameters​

T​

T extends AnyFunction

Parameters​

callback​

T | null | undefined

Returns​

(...args) => ReturnType<T> | undefined