Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thoriqdharmawan/element-helpers
Custom Hooks for your React Element 🌟🌟
https://github.com/thoriqdharmawan/element-helpers
custom-hooks helpers reactjs
Last synced: about 1 month 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 (about 4 years ago)
- Default Branch: main
- Last Pushed: 2020-12-16T16:14:57.000Z (about 4 years ago)
- Last Synced: 2023-03-07T17:57:22.600Z (almost 2 years ago)
- Topics: custom-hooks, helpers, reactjs
- Language: HTML
- Homepage: https://www.npmjs.com/package/element-helpers
- Size: 1.13 MB
- Stars: 2
- Watchers: 2
- 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); // 300return (
);
}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