Skip to content

Commit

Permalink
[unticketed] fix typescript error in usePrevious implementation (#3678)
Browse files Browse the repository at this point in the history
  • Loading branch information
doug-s-nava authored Jan 29, 2025
1 parent 4c80f17 commit 73b32a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/hooks/usePrevious.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useEffect, useRef } from "react";

export const usePrevious = <T>(value: T) => {
const ref = useRef<T>();
const ref = useRef<T>(undefined);
useEffect(() => {
ref.current = value;
});
Expand Down

0 comments on commit 73b32a7

Please sign in to comment.