react 监视屏幕大小宽度
const [windowWdith, setWindowWdith] = useState(document.body.clientWidth);
useEffect(() => {
window.addEventListener("resize", ()=>setWindowWdith(document.body.clientWidth);
return () => window.removeEventListener("resize", ()=>setWindowWdith(0));
});