Skip to content

DynamicRefGetter

Defined in: use-dynamic-refs.ts:18

Returns a ref for the given key, creating one if it doesn’t exist yet. Overloads ensure that calling without a key returns undefined.

Type Parameter
T
DynamicRefGetter(): undefined;

Defined in: use-dynamic-refs.ts:19

Returns a ref for the given key, creating one if it doesn’t exist yet. Overloads ensure that calling without a key returns undefined.

undefined

DynamicRefGetter(key): RefObject<T | null>;

Defined in: use-dynamic-refs.ts:20

Returns a ref for the given key, creating one if it doesn’t exist yet. Overloads ensure that calling without a key returns undefined.

Parameter Type
key string

RefObject<T | null>