/** * value의 이전 상태를 추적합니다. * * @param value state 또는 계산된 value. * @returns 컴포넌트에서 사용된 '이전' 상태. * * @example * function Component() { * const [count, setCount] = useState(0); * const prevCount = usePrevious(count); * // ... * return `Now: ${count}, before: ${prevCount}`; * } */ export default function usePrevious(value: T): T | undefined;