# react-redux-simple-form

> React Redux Simple Form

Latest version **0.1.0** (published 2018-06-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-redux-simple-form
pnpm add react-redux-simple-form
yarn add react-redux-simple-form
bun add react-redux-simple-form
```

## 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.1.0 |
| Published | 2018-06-29 |
| First published | 2018-05-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 16.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Martin Saulis |
| Maintainers | bstst |
| Keywords | react, react-native, redux, form, thunk |

## Links

- npm: https://www.npmjs.com/package/react-redux-simple-form
- Repository: https://github.com/bstst/react-redux-simple-form
- Homepage: https://github.com/bstst/react-redux-simple-form#readme
- Issues: https://github.com/bstst/react-redux-simple-form/issues
- npm.io page: https://npm.io/package/react-redux-simple-form

## Dependencies (4)

- [react](https://npm.io/package/react.md) ^16.3.2
- [redux](https://npm.io/package/redux.md) ^4.0.0
- [react-redux](https://npm.io/package/react-redux.md) ^5.0.7
- [redux-thunk](https://npm.io/package/redux-thunk.md) ^2.2.0

## 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.1.0 (latest) — 2018-06-29
- 0.0.18 — 2018-05-31
- 0.0.17 — 2018-05-28
- 0.0.16 — 2018-05-23
- 0.0.15 — 2018-05-23
- 0.0.14 — 2018-05-23
- 0.0.13 — 2018-05-23
- 0.0.12 — 2018-05-23
- 0.0.11 — 2018-05-22
- 0.0.10 — 2018-05-22
- 0.0.9 — 2018-05-22
- 0.0.8 — 2018-05-22
- 0.0.7 — 2018-05-22
- 0.0.6 — 2018-05-22
- 0.0.5 — 2018-05-22
- … 3 more at https://npm.io/package/react-redux-simple-form/versions

## README

# [![Build Status](https://travis-ci.org/bstst/react-redux-simple-form.svg?branch=master)](https://travis-ci.org/bstst/react-redux-simple-form) react-redux-simple-form
 
A simple React / React-Native form library using redux and redux-thunk. 
 
## Why?

Most react redux form libraries out there are too over-engineered and over-opinionated for my liking.

That's why I created this — "react-redux-simple-form" is a library for creating abstract redux forms both on React and React-Native.

Any component that has **form** and **name** properties and wrapped with the provided higher order component receives additional properties that are used to control the state of the form. Simple as that. 

## How?

Create your store:

```javascript
import { createStore, combineReducers, applyMiddleware } from 'redux';
import thunk from 'redux-thunk';
import { form } from 'react-redux-simple-form/reducers';

const store = createStore(combineReducers({ form }), applyMiddleware(thunk));
```

Create a basic input:

```javascript
import React, { Component } from 'react';
import { connectForm } from 'react-redux-simple-form';

class Input extends Component {
  render () {
    return (
      <div>
        <input
          onChange={(e) => this.props.change(e.target.value)}
          onBlur={() => this.props.touch()}
        />
        {this.props.field.error !== '' && <div>{this.props.field.error}</div>}
      </div>
    );
  }
}

const ConnectedInput = connectForm(Input);

export default ConnectedInput;
```
    
And use it:

```javascript
<ConnectedInput
  form="myform"
  name="myinput"
/>
```

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