Hook useLazyRef()
useLazyRef<
T>(create: () =>T):MutableRefObject<T>
Source: lazyRef.ts
A hook that initializes a ref lazily. Ensures the initializer function is only called once during the initial mount.
Type Parameters
T
T
Parameters
create
() => T
A factory function that returns the initial value.
Returns
MutableRefObject<T>