Skip to content

Commit 4986e5d

Browse files
committed
feat(hooks): add useRenderCount hook
1 parent 8a5e8e5 commit 4986e5d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/hooks/useRenderCount.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
'use client';
2+
import { useRef } from 'react';
3+
export function useRenderCount(): number {
4+
const count = useRef(0);
5+
count.current++;
6+
return count.current;
7+
}

0 commit comments

Comments
 (0)