// !!! 废弃了 import { useRef, useEffect } from 'react' export function usePropRef(prop: T) { const ref = useRef(prop) useEffect(() => { ref.current = prop }) return ref }