Deku
A library for creating UI components using a virtual DOM.
- It's small and modular. Roughly 8kb minified.
- Supports npm, duo, and bower.
- It has a beautiful, simple API for defining components.
- Uses a virtual DOM and diffing to run updates.
- It only supports evergreen browsers.
- Components can be used without the library.
- Components can be rendered to a string for server-side rendering.
- Easily testable components.
- Handles all event delegation for you without virtual events.
- Batched and optimized updates using
requestAnimationFrame
.
var {component,dom} = require('deku');
var Button = component({
onClick() {
this.setState({ clicked: true });
},
render(props, state) {
return dom('button', { onClick: this.onClick }, [props.text]);
}
});
Button.render(document.body, {
text: 'Click Me!'
});
Getting Started
Download
npm install deku
bower install deku
Using Duo:
var deku = require('segmentio/deku');
Or download and use them manually:
Build Status
License
MIT