0.8.1 • Published 7 years ago

redux-form-lite v0.8.1

Weekly downloads
4
License
MIT
Repository
github
Last release
7 years ago

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

0.8.1

7 years ago

0.8.0

7 years ago

0.7.0

7 years ago

0.6.0

7 years ago

0.5.14

7 years ago

0.5.13

7 years ago

0.5.12

7 years ago

0.5.11

7 years ago

0.5.10

7 years ago

0.5.9

7 years ago

0.5.8

7 years ago

0.5.7

7 years ago

0.5.6

7 years ago

0.5.5

7 years ago

0.5.4

7 years ago

0.5.3

7 years ago

0.5.2

7 years ago

0.5.1

7 years ago

0.5.0

7 years ago

0.4.0

7 years ago

0.3.0

7 years ago

0.2.0

7 years ago