Create view components using a virtual DOM


A simple library for creating UI components using virtual DOM.

npm install deku

Read the documentation on the wiki →

  • It's small at roughly 8kb.
  • Supports npm, Duo, and Bower. Learn More →
  • It only supports IE10+ and better browsers. Learn More →
  • Server-side rendering.
  • Easily test components.
  • Handles all event delegation for you without virtual events.
  • Batched and optimized updates using requestAnimationFrame.
  • Pooling of DOM elements.
import {component,dom} from 'deku';
let Button = component({
  onClick() {
    this.setState({ clicked: true });
  render(props, state) {
    return dom('button', { onClick: this.onClick }, [props.text]);
export {Button}
import {Button} from './button';
import {render,scene} from 'deku';
// Create a scene 
var app = scene(Button)
app.setProps({ text: 'Click Me!' })
// Render the scene to the page 
render(app, document.body);
// Update the scene 
  text: 'Seriously, click me.'