diff options
author | crupest <crupest@outlook.com> | 2022-04-24 16:37:09 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-04-24 16:37:09 +0800 |
commit | fee641197dc4359c189b9ebea45800d71cb5aa8d (patch) | |
tree | 627d79b6cdda35f3ff33147815d932959d09354d /FrontEnd/src/utilities | |
parent | e1b5e204156d38fe986996f2bbe3914af7d1e226 (diff) | |
download | timeline-fee641197dc4359c189b9ebea45800d71cb5aa8d.tar.gz timeline-fee641197dc4359c189b9ebea45800d71cb5aa8d.tar.bz2 timeline-fee641197dc4359c189b9ebea45800d71cb5aa8d.zip |
...
Diffstat (limited to 'FrontEnd/src/utilities')
-rw-r--r-- | FrontEnd/src/utilities/useValueWithRef.ts | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/FrontEnd/src/utilities/useValueWithRef.ts b/FrontEnd/src/utilities/useValueWithRef.ts deleted file mode 100644 index 8c5f2039..00000000 --- a/FrontEnd/src/utilities/useValueWithRef.ts +++ /dev/null @@ -1,11 +0,0 @@ -import React from "react"; - -export default function useValueWithRef<T>( - value: T -): React.MutableRefObject<T> { - const ref = React.useRef<T>(value); - React.useEffect(() => { - ref.current = value; - }, [value]); - return ref; -} |