https://github.com/thoriqdharmawan/element-helpers
Custom Hooks for your React Element 🌟🌟
https://github.com/thoriqdharmawan/element-helpers
custom-hooks helpers reactjs
Last synced: 3 months ago
JSON representation
Custom Hooks for your React Element 🌟🌟
- Host: GitHub
- URL: https://github.com/thoriqdharmawan/element-helpers
- Owner: thoriqdharmawan
- Created: 2020-11-06T12:54:55.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2020-12-16T16:14:57.000Z (over 5 years ago)
- Last Synced: 2025-10-23T14:33:16.114Z (9 months ago)
- Topics: custom-hooks, helpers, reactjs
- Language: HTML
- Homepage: https://www.npmjs.com/package/element-helpers
- Size: 1.13 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Helper for your React Element :star2::star2:
* [NPM](https://www.npmjs.com/package/element-helpers) here
* [GitHub](https://github.com/thoriqdharmawan/element-helpers) here
* [Live Code](https://github.com/thoriqdharmawan/element-helpers/blob/main/src/App.js) here
### Installation
```
npm i element-helpers
```
### Usage
```javascript
import { useGetDimensions } from "element-helpers";
function App() {
const [refNode, { width, height }] = useGetDimensions();
console.log("height : ", height); // 100
console.log("width : ", width); // 300
return (
);
}
export default App;
```
### Props
Name | Required | Information
---- | ----- | ----
refNode | true | You can change the name
width | false
height | false
bottom | false
left | false
right | false
top | false
x | false
y | false