MCPcopy Create free account
hub / github.com/code100x/chess / handleSize

Function handleSize

apps/frontend/src/hooks/useWindowSize.ts:6–11  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4 const [windowSize, setWindowSize] = useState({ width: 0, height: 0 });
5
6 const handleSize = () => {
7 setWindowSize({
8 width: window.innerWidth,
9 height: window.innerHeight,
10 });
11 };
12
13 useLayoutEffect(() => {
14 handleSize();

Callers 1

useWindowSizeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected