This is a project which aims to create a really easy way to build complex forms, both using component state with events or using redux
npm install react-formedThis is a project which aims to create a really easy way to build complex forms, both using component state with events or using redux
       
``bash`
npm install react-formed
The root element of a for is the Form element. Inside this the form elements are placed. Currently only one element comes pre-packed, which is Input, but more is on the way. Input acts almost exacly as a input element would with the same API, with the one exception that a name attribute is required, and will be the key in the resulting object
`javascript
import { Form, Input } from 'react-formed';
export default () => (
The above example will log an object to the console, each time a value is changed. The value will have the form of
{ field1: ..., field2: ... }$3
`javascript
import { Form, Input } from 'react-formed';export default () => (
)
`Be aware that
initValues will override any previous set form values on mount. Setting init value to {} will clear the form on remount (_obs:_ This behaviour is subject to change in a later version)
$3
Values can also be grouped, which will cause them to create a namespace inside the form values, for instance
`javascript
import { Form, Input, Group } from 'react-formed';export default () => (
)
`would result in an object
{ group1: { field1: ..., field2: ... }, field3 }$3
`javascript
import { Form, Input, List } from 'react-formed';export default () => (