newforms
newforms copied to clipboard
What is your favorite react form implementation?
-
tcomb-form - UI library for developing forms writing less code
-
react-forms - Forms library for React
-
newforms - Isomorphic form-handling for React
- wingspan-forms - A dynamic form library for Facebook React
-
formjs - A form generator for Reactjs
-
react-form-builder - A Form Builder for React.js
-
plexus-form - A dynamic form component for react using JSON-Schema
-
formsy-react - A form input builder and validator for React JS
-
rc-form-validation
From the top of my head:
- newforms
- actively maintained
- isomorphic
- predefined validators and widgets
- async validations out of the box
The core design of newforms is still that of django.forms, so it's currently more suitable for fairly static CRUD-like editing which uses the provided widgets than highly-dynamic forms with custom React widgets. For example a notable feature which is missing is the ability to easily change a field's configuration on the fly (e.g. dynamic choices for dropdowns, chained inputs, dynamic disabling, dynamic visibility management).
Since the rendering use case for Django forms is "render to HTML and done", its core design never need to take into account mutable, dynamic forms, which is what you get with React on the client side. As such, features like onChange validation and async validation were lumped on top of this and rendering at the field level is managed by regular JavaScript objects which output ReactElements, rather than React components, which makes it trickier to implement custom widgets than it would otherwise be.
My feeling is increasingly that you should evaluate how React form libraries work and move on to the next one or write your own form-handling if you have very specific needs which they don't obviously cater to. There are so many decisions to be made at each step of implementing reusable form validation that it's unlikely any form library will cover everything exactly the way you want it, or give you all the control you need to customise each piece.
@gcanti are you saying you like newforms better than your own tcomb-forms?
As @insin wisely says:
There are so many decisions to be made at each step of implementing reusable form validation that it's unlikely any form library will cover everything exactly the way you want it
I don't like tcomb-form, I just need its features.