redux-form-lite
A simple form management for Redux & React.
Last updated 4 years ago by oreqizer .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install redux-form-lite 
SYNC missed versions from official npm registry.

redux-form-lite

npm Build Status codecov

A simple form manager for React and Redux. The API similarities to redux-form are intentional - this project is meant to take the best of redux-form while keeping it as lightweight and simple to use as possible!

Installation

Make sure you have react, redux and react-redux installed! Then simply:

yarn add redux-form-lite

Or for the oldschool:

npm i redux-form-lite --save

Quickstart

Mount the redux-form-lite reducer to your root reducer as reduxFormLite.

import { createStore, combineReducers } from 'redux';
import { reducer } from 'redux-form-lite';

const rootReducer = combineReducers({
  // ... your other reducers
  reduxFormLite: reducer,
});

const store = createStore(rootReducer);

Then simply wrap your desired form with the Form component.

import { Form, Field } from 'redux-form-lite';

const MyForm = (props) => (
  <Form name="contact">
    <div>
      <label htmlFor="name">Name</label>
      <Field name="name" component="input" type="text" />
    </div>
    <div>
      <label htmlFor="email">Email</label>
      <Field name="email" component="input" type="email" />
    </div>
    <button type="submit">Submit</button>
  </Form>
);

export default MyForm;

That's it! This is how you mount the most basic form. For more advanced usage, check out the API - there are examples for each use case.

Documentation

Current Tags

  • 0.8.1                                ...           latest (4 years ago)

22 Versions

  • 0.8.1                                ...           4 years ago
  • 0.8.0                                ...           4 years ago
  • 0.7.0                                ...           4 years ago
  • 0.6.0                                ...           4 years ago
  • 0.5.14                                ...           4 years ago
  • 0.5.13                                ...           4 years ago
  • 0.5.12                                ...           4 years ago
  • 0.5.11                                ...           4 years ago
  • 0.5.10                                ...           4 years ago
  • 0.5.9                                ...           4 years ago
  • 0.5.8                                ...           4 years ago
  • 0.5.7                                ...           4 years ago
  • 0.5.6                                ...           4 years ago
  • 0.5.5                                ...           4 years ago
  • 0.5.4                                ...           4 years ago
  • 0.5.3                                ...           4 years ago
  • 0.5.2                                ...           4 years ago
  • 0.5.1                                ...           4 years ago
  • 0.5.0                                ...           4 years ago
  • 0.4.0                                ...           4 years ago
  • 0.3.0                                ...           4 years ago
  • 0.2.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (27)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |