Function form

allows creation of a form outside of the Form component

const myForm = form({
firstName: text('First Name', {validate:v=>v.length>0, placeholder:'Enter your first name'}),
lastName: text('Last Name', {validate:v=>v.length>0, placeholder:'Enter your last name'}),
});

return <Form inputs={myForm} onSubmit={v=>{
console.log(v.firstName); // string
console.log(v.lastName); // string
}}/>