Developers get started at zero cost
Using render-props
mode, using react-hook
and ResizeObserver
implementation, the code is maximized and streamlined
Has been tested and polished in enough business scenarios within the company
yarn add @oyyds/react-auto-sizer # or npm i @oyyds/react-auto-sizer -S
import AutoSizer from '@oyyds/react-auto-sizer';const AutoSizeComponent = () => {return (<div><AutoSizer>{({ width, height }) => (<divstyle={{width,height,}}>Content area</div>)}</AutoSizer></div>);};
Github Issue | Dingding group |
---|---|
react-auto-sizer/issues | ![]() |