# react-autofill

> A polyfill for Safari that triggers a change event on autofill

Latest version **1.1.4** (published 2016-10-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-autofill
pnpm add react-autofill
yarn add react-autofill
bun add react-autofill
```

## 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.4 |
| Published | 2016-10-08 |
| First published | 2015-10-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 19 |
| Author | Chiel Robben |
| Maintainers | pephers |
| Keywords | autofill, autocomplete |

## Links

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

## Recent versions

- 1.1.4 (latest) — 2016-10-08
- 1.1.3 — 2016-06-20
- 1.1.2 — 2015-10-26
- 1.1.1 — 2015-10-26
- 1.1.0 — 2015-10-26
- 1.0.8 — 2015-10-26
- 1.0.6 — 2015-10-26
- 1.0.5 — 2015-10-26
- 1.0.4 — 2015-10-26
- 1.0.3 — 2015-10-26
- 1.0.2 — 2015-10-26
- 1.0.0 — 2015-10-26

## README

React Autofill
==============
A component that polyfills a change event in Safari when input fields are
autofilled.

## Installation
```
npm install --save react-autofill
```

## Usage
ES2015 (aka. ES6):
```js
import React from 'react';
import ReactDOM from 'react-dom';
import autofill from 'react-autofill';

class Form extends React.Component {

    constructor() {
        super();
        this.state = {};
    }

    handleChange(e) {

        const { name, value } = e.currentTarget;
        const nextState = {};

        nextState[name] = value;

        this.setState(nextState);

    }

    render() {

        return (
            <form>
                <input
                    onChange={this.handleChange.bind(this)}
                    name="field"
                    value={this.state.field}/>
            </form>
        );

    }

}

ReactDOM.render(React.createElement(autofill(Form)), document.body);

```
ES7 (aka. ES2016):
```js
@autofill
class Form extends React.Component {
    ...
}
```

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