"use client";
import { useRef as n, useEffect as u } from "react";
const o = (e, r = null) => {
  const t = n(r);
  return u(() => {
    e && (typeof e == "function" ? e(t.current) : e.current = t.current);
  }, [e]), t;
};
export {
  o as useForwardRef
};
