reactApplyHooksCustom HooksahooksuseLatest实现本页总览实现一、认识 二、实现 import { useRef } from 'react';function useLatest(value) { const ref = useRef(value); ref.current = value; return ref;}export default useLatest;