8 lines
158 B
Plaintext
8 lines
158 B
Plaintext
import { useRef } from 'react';
|
|
function useLatest(value) {
|
|
var ref = useRef(value);
|
|
ref.current = value;
|
|
return ref;
|
|
}
|
|
export default useLatest;
|