Fix missing dependency in effect
This commit is contained in:
@@ -11,7 +11,7 @@ export function usePrevious<T>(value: T, initialValue?: T): T | undefined {
|
||||
|
||||
useEffect(() => {
|
||||
ref.current = value;
|
||||
});
|
||||
}, [ value ]);
|
||||
|
||||
return ref.current;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user