Package Exports
- react-formstate
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-formstate) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
react-formstate
Form validation in React
A blatant request for feedback/assistance
After a year and a half on NPM, looking at overall downloads and GitHub stars, this package has received lukewarm response at best, which is fine, if it deserves it. The thing I get stuck on, is when I analyze this package and compare it to alternative packages, I keep coming up with a favorable picture of this one, which is why I threw so much into trying to make it accessible and available to the community. So I'm curious to understand, in the eyes of the React community, how this is coming up short. If you are willing to provide feedback here, you'd be helping me out a great deal. Thanks.
Setup
$ npm install react-formstate --saveDemo
Validated react-bootstrap components: react-formstate-demo
Walkthrough
Features and examples
- Basic example
- Show messages onChange, onBlur, or onSubmit
- Validation
- React-Bootstrap example
- Checkbox, CheckboxGroup, RadioGroup, Select
- Nonstandard input example: react-datepicker
Advanced features and examples
- Asynchronous validation
- Nested form components
- Form extension
- Arrays
- The onUpdate callback
- Redux integration
Motivation
If you are adding validation to a React form and you find yourself thinking - there must be a better way - that was the impetus behind react-formstate. Since React is all about responding to changes in component state, the key to a React-based solution is to provide an API to easily manage form state, specifically validation status. In doing so, you get productivity gains beyond validation. The end result is you keep your form components DRY.
Documentation
- Advantages of react-formstate
- Criticisms of react-formstate
- v0.6.0 release notes
- v0.5.0 release notes
- API
- React forms
Peer dependencies
- React
- es5 (for example: Object.keys and Array.isArray)
- That's it!