Monkberry is a JavaScript library for building web user interfaces
Last updated 2 years ago by abdillah .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @abdillah/monkberry 
SYNC missed versions from official npm registry.


npm Build Status

Monkberry is blazingly fast, small 1kb and simple JavaScript library for building web user interfaces.


Monkberry comes with powerfull templating engine, which is compiled to JavaScript.

  {% for todos %}
      {% if complete %}
        <del>{{ text }}</del>
      {% else %}
        <em>{{ text }}</em>
      {% endif %}
  {% endfor %}

and then

import Monkberry from 'monkberry';
import Template from 'template.monk';

const view = Monkberry.render(Template, document.body);

view.update({todos: [...]});


  • Small 1kb minified & gzipped
  • Simple, small learning curve
  • Fully tested
  • Precompiled templates
  • Source maps
  • Custom tags
  • Blazingly fast (only necessary dom updates)


Documentation available on monkberry.js.org site.


If you want to hack on Monkberry, the first step is to fork the repo.

# Build compiler
npm run build

# Build parser
npm run build:parser

# Watch changes and rebuild
npm run watch

# Start tests server




Why is Monkberry so fast? Even in comparison with React, Monkberry is 10 times faster, sometimes 100 times faster. It's because Monkberry will do only necessary dom updates, and does it in a completely different way than React does. Monkberry compiles template to plain JavaScript to gain an advantage by using v8 hidden classes and reduce call stack. There is no virtual dom (in general, an react app have to keep 3 virtual doms), for example next template will be generated to JavaScript code which will do only necessary dom updates on state changes.

    <h1>{{ title }}</h1>

Will be compiled to code like this:

function (state) {
  h1.textContent = state.title;

Benchmarks covers a few use cases and compares Monkberry with React and innerHTML. Also, it contains real site code and data.


The MIT License (MIT) Copyright © 2016 Medvedev Anton

Current Tags

  • 4.0.8                                ...           latest (2 years ago)

1 Versions

  • 4.0.8                                ...           2 years ago
Maintainers (1)
Today 0
This Week 0
This Month 3
Last Day 0
Last Week 0
Last Month 1
Dependencies (3)
Dev Dependencies (6)
Dependents (0)

Copyright 2014 - 2016 © taobao.org |