# react-native-measureme

> A HOC to make your React-Native components aware of their width and height

Latest version **0.0.2** (published 2019-08-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-measureme
pnpm add react-native-measureme
yarn add react-native-measureme
bun add react-native-measureme
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2019-08-31 |
| First published | 2016-06-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 7.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 28 |
| Author | Pawan Kumar |
| Maintainers | obipawan |
| Keywords | react, react-native, component, measure, size, dimensions, size-aware |

## Links

- npm: https://www.npmjs.com/package/react-native-measureme
- Repository: https://github.com/obipawan/react-native-measureme
- Homepage: https://github.com/obipawan/react-native-measureme#readme
- Issues: https://github.com/obipawan/react-native-measureme/issues
- npm.io page: https://npm.io/package/react-native-measureme

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.0.2 (latest) — 2019-08-31
- 0.0.1 — 2016-06-05

## README

# react-native-measureme
[![NPM version](https://badge.fury.io/js/react-native-measureme.svg)](http://badge.fury.io/js/react-native-measureme)

A HOC to make your React-Native components aware of their `width` and `height`

## Installation
```sh
npm i --save react-native-measureme
```

## Usage
```javascript
import React from 'react';
import {View} from 'react-native';

const SizeAwareComponent = React.createClass({
    render(){
        //this component knows its render width and height through
        //this.props.width & this.props.height
        <View style={{width:this.props.width, height:this.props.height}} />
    }
});

module.exports = require('react-native-measureme')(SizeAwareComponent);
```

## Development
PRs highly appreciated

License
----
MIT License

---
_Source: https://npm.io/package/react-native-measureme · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
