# gmati-react-libs

> ## Tiny libraryes for React

Latest version **1.1.2** (published 2018-07-30) · ISC license · 0 weekly downloads

## Install

```sh
npm install gmati-react-libs
pnpm add gmati-react-libs
yarn add gmati-react-libs
bun add gmati-react-libs
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.2 |
| Published | 2018-07-30 |
| First published | 2018-07-30 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 16.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Mati Green |
| Maintainers | gmati13 |

## Links

- npm: https://www.npmjs.com/package/gmati-react-libs
- Repository: https://github.com/GMati13/gmati-react-libs
- Homepage: https://github.com/GMati13/gmati-react-libs#readme
- Issues: https://github.com/GMati13/gmati-react-libs/issues
- npm.io page: https://npm.io/package/gmati-react-libs

## Dependencies (1)

- [react](https://npm.io/package/react.md) ^16.4.1

## Recent versions

- 1.1.2 (latest) — 2018-07-30
- 1.1.1 — 2018-07-30
- 1.1.0 — 2018-07-30
- 1.0.6 — 2018-07-30
- 1.0.5 — 2018-07-30
- 1.0.4 — 2018-07-30
- 1.0.3 — 2018-07-30
- 1.0.2 — 2018-07-30
- 1.0.0 — 2018-07-30

## README

# gmati-react-libs

## Tiny libraryes for React

### Install
```
npm i -s gmati-react-libs
```

#### withControls

```
import React from 'react';
import { withControls } from 'gmati-react-libs'

class App extends React.Component {
    render() {
        return <input value={this.props.control('control name')} onChange={this.props.handleChange('control name')} />;

        // with groups
        // return <input value={this.props.control('control name', 'group name')} onChange={this.props.handleChange('control name', {group: 'group name'})} />;

        // custom target[value]
        // return <input type="checkbox" value={this.props.control('control name')} onChange={this.props.handleChange('control name', {value: 'checked'})} />;

        // callback
        // return <input value={this.props.control('control name')} onChange={this.props.handleChange('control name', null, () => console.log('control changed!'))} />;
    }
}

export default withControls(App);
```

#### withMedia

```
import React from 'react';
import { withMedia } from 'gmati-react-libs'

class App extends React.Component {
    render() {
        console.log(this.props.media('media name'))
        // console.log(this.props.media('media name', 'group name'))

        return <input onChange={this.props.handleUpload('media name')} />;

        // with groups
        // return <input type="file" onChange={this.props.handleUpload('media name', {group: 'group name'})} />;

        // filter type
        // return <input type="file" onChange={this.props.handleUpload('media name', {type: 'image'})} />;

        // callback
        // return <input type="file" onChange={this.props.handleUpload('media name', null, () => console.log('file uploading!'))} />;
    }
}

export default withMedia(App);
```

###### by Mati Green

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