https://github.com/nichoth/vdom-form-field
Easy form fields
https://github.com/nichoth/vdom-form-field
Last synced: about 2 months ago
JSON representation
Easy form fields
- Host: GitHub
- URL: https://github.com/nichoth/vdom-form-field
- Owner: nichoth
- Created: 2015-10-14T16:13:17.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2015-11-10T20:30:34.000Z (over 10 years ago)
- Last Synced: 2025-09-26T04:33:03.748Z (10 months ago)
- Language: JavaScript
- Size: 141 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# vdom form field
Easy form fields with `virtual-dom`.
## install
$ npm install vdom-form-field
## example
```js
var vdom = require('virtual-dom');
var h = vdom.h;
var FormField = require('vdom-form-field');
var state = FormField({
field: 'example'
});
var loop = require('main-loop')( state(), FormField.render, vdom );
state(loop.update);
document.getElementById('content').appendChild(loop.target);
```