Skip to content

Commit

Permalink
fix(react): usePreservedState comparator 타입 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
ssi02014 committed May 19, 2024
1 parent 20e4a45 commit 9a42186
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react/src/hooks/usePreservedState/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { deepEqual } from '@modern-kit/utils';

export const usePreservedState = <T>(
value: T,
comparator?: (source: T, target: T) => boolean
comparator?: (source: any, target: any) => boolean
) => {
const [preservedState, setPreservedState] = useState(value);
const callbackComparator = usePreservedCallback(comparator ?? deepEqual);
Expand Down

0 comments on commit 9a42186

Please sign in to comment.