onion-form
onion-form copied to clipboard
Comparison to redux-form?
We built onion-form from 5 years experience (3 years jQuery + 2 years React) and it is solving for us a huge amount of problems and adding abstraction of thing that are not changing because of best practices.
Our primary focus is on:
- simplicity
- minialistic design
- extendability
- trying to use best practices for validations
- validation methods are very simple
(valueOfEditedField, valuesOfAllFields) => (! valueOfEditedField ? 'is Required' : null) - composition of validations by passing array of them
[isRequired, email] - reusability of validations
- validation methods are very simple
- reusability of whole Field (you can use one field in different forms)
- easy possibility to save errors from server validations to State and lot more.
We had problem with huge redux-form complexity.
Pls correct me if I am saying something wrong, I didn't have a lot of time to test latest redux-form.