MCPcopy Create free account
hub / github.com/Linen-dev/linen.dev / useResize

Function useResize

apps/web/hooks/resize.tsx:7–15  ·  view source on GitHub ↗
({ onResize }: Props)

Source from the content-addressed store, hash-verified

5}
6
7function useResize({ onResize }: Props) {
8 useEffect(() => {
9 onResize();
10 window.addEventListener('resize', onResize);
11 return () => {
12 window.removeEventListener('resize', onResize);
13 };
14 }, []);
15}
16
17export default useResize;

Callers 1

useDeviceFunction · 0.85

Calls 1

onResizeFunction · 0.85

Tested by

no test coverage detected