https://github.com/hustcc/rc-size-sensor
React component wrapper for DOM element size sensor.
https://github.com/hustcc/rc-size-sensor
react-component size-sensor
Last synced: about 1 month ago
JSON representation
React component wrapper for DOM element size sensor.
- Host: GitHub
- URL: https://github.com/hustcc/rc-size-sensor
- Owner: hustcc
- Created: 2019-05-13T07:32:13.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-12-07T04:06:59.000Z (over 5 years ago)
- Last Synced: 2025-03-17T07:51:26.523Z (about 1 month ago)
- Topics: react-component, size-sensor
- Language: TypeScript
- Homepage: https://git.hust.cc/size-sensor/
- Size: 3.91 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# rc-size-sensor
> React component for [size-sensor](https://github.com/hustcc/size-sensor).
[](https://github.com/hustcc/rc-size-sensor/actions)
[](https://www.npmjs.com/package/rc-size-sensor)
[](https://www.npmjs.com/package/rc-size-sensor)## Install
```bash
$ npm i --save rc-size-sensor
```## Usage
```jsx
import SizeSensor from 'rc-size-sensor';// ...
onResize = (element) => {
// do something
}render() {
return (
);
}
```## License
MIT@[hustcc](https://github.com/hustcc).