JSPM

  • Created
  • Published
  • Downloads 4
  • Score
    100M100P100Q53619F
  • License MIT

A productivity API for React forms based on setState

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

Coverage Status Build Status

A productivity API for React forms based on setState

react-formstate streamlines form components using plain old setState and one-way binding. It's like building a form in raw React... minus the busy work.

v0.5.0 release notes

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.

A note from the author

react-formstate turned out even better than I expected so I decided to share it with the community. It's a fully formed, optimal-in-its-own-way approach that I believe is worthy of way more traction than it's gotten thus far on NPM, but I'm always open to the idea I'm missing something.

If you have any feedback I am happy to hear it. Thanks.

Demo (NEW!)

Validated react-bootstrap components: react-formstate-demo

Setup

$ npm install react-formstate --save

Walkthrough

Features and examples

Advanced features and examples

Arguments for react-formstate

Documentation

Peer dependencies

  • React
  • es5 polyfills (for example: Object.keys and Array.isArray)
  • That's it!

Enhancements

If you have an idea for improving react-formstate, or a feature request, I am happy to hear it.

Or, feel free to fork the repository and send a pull request.

Contributions

If you see value in react-formstate and react-formstate-validation please star the NPM packages and the GitHub repositories.

Also, you can help others find the packages by recommending them and linking to them. Thanks!