formjsx

0.0.1 • Public • Published

FormJSX

Tiny React/ES6 form helper

Why?

I hate doing repetitive things, so I wrote a generic form class.

var form = new Form.Create;
form.on('submit', function(values) {
  console.log(values);
});
ReactDOM.render(form.render({
  name1: {type: 'text'},
  name2: {type: 'text'},
  name3: { 
    type: 'form',
    elements: {
      yet_another: { type: 'text'},
    }
  },
}, document.getElementById("foobar"));
 

Readme

Keywords

none

Package Sidebar

Install

npm i formjsx

Weekly Downloads

1

Version

0.0.1

License

ISC

Last publish

Collaborators

  • crodas