Skip to content

Commit c9ada6a

Browse files
authored
chore: avoid react linting errors (#83)
1 parent 31c1b19 commit c9ada6a

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/components/editor.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,11 @@ export const Editor: FC<EditorProperties> = ({ readOnly, value, onChange }) => {
5353
];
5454

5555
const debouncedOnChange = useCallback(
56-
debounce((value: string) => {
57-
onChange?.(value);
58-
}, 400),
56+
(value: string) => {
57+
debounce(() => {
58+
onChange?.(value);
59+
}, 400)();
60+
},
5961
[onChange],
6062
);
6163

src/components/path/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ export const CodePath: FC = () => {
5959

6060
useEffect(() => {
6161
fetchCodePath();
62+
// eslint-disable-next-line react-hooks/exhaustive-deps -- we want to fetch code path once on mount, afterwards the "useDebouncedEffect" takes over
6263
}, []);
6364

6465
useDebouncedEffect(

0 commit comments

Comments
 (0)