Temp
This commit is contained in:
@@ -14,3 +14,11 @@ export const useUpdatedEffect = (
|
||||
}
|
||||
}, dependencies)
|
||||
}
|
||||
|
||||
export const usePrevious = <T,>(value: T): T | undefined => {
|
||||
const ref = useRef<T>()
|
||||
useEffect(() => {
|
||||
ref.current = value
|
||||
})
|
||||
return ref.current
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user