@anoki/fse-ui
Version:
FSE UI components library
3 lines (2 loc) • 377 B
JavaScript
;const i=require("react");function d(){return typeof window<"u"?window.innerWidth:null}function o(){const[e,t]=i.useState(d());return i.useEffect(()=>{if(typeof window>"u")return;function n(){t(window.innerWidth)}return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[]),e}module.exports=o;
//# sourceMappingURL=index.cjs451.js.map