Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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 🌟🌟

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