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 Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T |
Call Signature
Section titled “Call Signature”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.
Returns
Section titled “Returns”undefined
Call Signature
Section titled “Call Signature”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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
key |
string |
Returns
Section titled “Returns”RefObject<T | null>