super-harness / src /hooks /use-latest.ts
Cyber Catalyst Team
Deploy to HF Spaces with LFS
4782147
Raw
History Blame Contribute Delete
145 Bytes
import { useRef } from "react";
export const useToRef = <T>(value: T) => {
const ref = useRef(value);
ref.current = value;
return ref;
};