• This project
    • Loading...
  • Sign in

2020-1-CloudComputing / C_Team_KhuDrive

%ea%b7%b8%eb%a6%bc1
Go to a project
Toggle navigation Toggle navigation pinning
  • Projects
  • Groups
  • Snippets
  • Help
  • Project
  • Activity
  • Repository
  • Graphs
  • Network
  • Create a new issue
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Network
  • Compare
  • Branches
  • Tags
Switch branch/tag
  • C_Team_KhuDrive
  • frontend
  • src
  • util
  • usePrevious.ts
  • 김재형's avatar
    Implement FileList component · e1ad1437
    e1ad1437
    김재형 authored 2020-06-14 19:20:29 +0900
usePrevious.ts 194 Bytes
Raw Blame History Permalink
1 2 3 4 5 6 7 8 9
import { useRef, useEffect } from "react";

export function usePrevious<T>(value: T) {
  const ref = useRef<T>();
  useEffect(() => {
    ref.current = value;
  });
  return ref.current as T;
}