Bin
2025-12-17 8916e4c7ee8b37479c6c5ad74e81697cf300e234
1
2
3
4
5
6
7
import { useRef } from "react";
 
export function useValueRef<T>(value: T) {
  const ref = useRef<T>(value);
  ref.current = value;
  return ref;
}