MCPcopy Create free account
hub / github.com/adobe/react-spectrum / onWindowResize

Function onWindowResize

packages/react-aria/src/virtualizer/ScrollView.tsx:309–311  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

307 state.viewportSize = new Size(window.innerWidth, window.innerHeight);
308
309 let onWindowResize = () => {
310 updateSizeEvent(flushSync);
311 };
312
313 window.addEventListener('resize', onWindowResize);
314 return () => window.removeEventListener('resize', onWindowResize);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected