// Field Component
import { dripFormField } from 'react-drip-form';
const MyField = () => {/* ... */};
export default dripFormField({/* options */})(MyField);
// Form Component
import { dripForm } from 'react-drip-form';
const MyForm = () => {/* ... */};
export default dripForm({/* options */})(MyForm);
react-drip-form
is a HoC-based API that passes the necessary props.
By using Hoc and separating Behavior and View, you can freely decide the structure of HTML and styling with.
Also, “Render according to Props” This flow adapts to React’s philosophy.
Learning cost is lowered by approaching React standard API.
However, it may be difficult to create components such as <textarea>
and <select>
, as well as Checkbox and Radio from scratch. (Prototype project etc.)
In such a case, you can quickly proceed with development by using the default component or using the component set for UI framework.
A Form created using react-drip-form
has a role of returning a valid values.
It is not involved in the application state.
Whatever way you manage application states, you can integrate with react-drip-form
.
Flux
, redux
, MobX
and rx
.
Validator used by react-drip-form
is a separate package called drip-form-validator.
This has the following advantages.
Because there are advantages like the above, it is a prototype so you want to make it quickly, you can realize the desire to make firmly because it is a production.