@zero-dependency/reactFunctionsuseLatestuseLatest CallableuseLatest<T>(value: T): React.MutableRefObject<T>This is mostly useful to get access to the latest value of some props or state inside an asynchronous callback, instead of that value at the time the callback was created from.Type parametersTParametersvalue: TThe value to store in a ref.Returns React.MutableRefObject<T>
This is mostly useful to get access to the latest value of some props or state inside an asynchronous callback, instead of that value at the time the callback was created from.