redux-pure-form
Redux actions for good performance and hight integration with your reducers
- Very small (less than 4Kb)
- Without dependencies
- Use your current react-redux
connect
- Don't create react-redux connection for each field
- Can by highly customizable
Installation
npm i -S redux-pure-form
Usage
import formActions mergeActionsToProps formReducer from '../dist/redux-pure-form.min.js'; { return <form> <input ="text" // ="user.name" // = // /> <select = ="user.gender" > <option ="male">male</option> <option ="female">female</option> </select> <label> <input ="checkbox" ="user.checkboxes[]" = ="1" /> First checkbox </label> <br /> <label> <input ="checkbox" ="user.checkboxes[]" = ="2" /> Second one </label> </form> ; } // ... const formNameReducer = ; { switch actiontype default: // add form reducer as default reducer return ; } // ... // add mergeActionsToProps as third argumentconst Connected = Example;
No Additional Settings Yet
Changelog (latest on top)
- Breaking: checkbox values
'1'
and'true'
will be converted to1
andtrue
respectively - add array support
- change reducer API
- first release
Developing
npm install
npm run webpack:dev -- --watch
npm run webpack:prod -- --watch
- Open
index.html
andexample.js
from examples