Skip to content

Commit e218de9

Browse files
committed
fix: make deps readonly
1 parent 16a41fd commit e218de9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/hooks/use-did-update.hook.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
/* eslint-disable react-hooks/exhaustive-deps */
22
import { useEffect, useRef } from "react";
33

4-
export const useDidUpdate = (callback: () => void, dependencies: unknown[], useOnMount = false) => {
4+
export const useDidUpdate = (
5+
callback: () => void,
6+
dependencies: readonly unknown[],
7+
useOnMount = false,
8+
) => {
59
const mountRef = useRef(useOnMount);
610

711
useEffect(() => {

0 commit comments

Comments
 (0)