VNDB fork of mithril.js
Find a file
2016-09-16 12:09:49 -07:00
api Merge pull request #1303 from pygy/simplify-resolution-identifiers 2016-09-09 10:38:31 -04:00
bundler fix typo in comment 2016-08-24 01:20:27 -04:00
docs add parenthesis 2016-09-16 12:09:49 -07:00
examples fix react dbmon 2016-08-03 17:28:54 -04:00
module Quiet some ESLint errors (#1060) 2016-05-19 22:18:31 -07:00
ospec Code style fix for 6b922d0: substitute double quotes 2016-08-31 11:54:21 +01:00
promise Add editorconfig, resolve differences 2016-06-18 03:22:12 -04:00
querystring Prevent undesired Date parsing 2016-09-15 16:05:30 -04:00
render Merge remote-tracking branch 'origin/rewrite' into rewrite 2016-09-12 09:48:30 -04:00
request special case 304 2016-09-12 10:26:08 -04:00
router Lint the router files 2016-09-03 00:32:12 +02:00
test-utils m.fragment docs 2016-08-24 00:26:15 -04:00
tests Fix the bundle and bundle tests 2016-09-03 23:28:17 +02:00
util Prevent Infinite Loop in m.prop.combine 2016-09-09 23:06:30 -04:00
.deploy.enc Set up repo for travis commits (#1210) 2016-08-04 09:58:28 -07:00
.editorconfig Add editorconfig, resolve differences 2016-06-18 03:22:12 -04:00
.eslintignore Add ESLint and a generated config/ignore file 2016-05-19 12:37:33 -07:00
.eslintrc.js Add editorconfig, resolve differences 2016-06-18 03:22:12 -04:00
.gitignore Quiet some ESLint errors (#1060) 2016-05-19 22:18:31 -07:00
.travis.yml Improve travis commit message slightly (#1218) 2016-08-04 22:38:20 -07:00
browser.js unbreak bundler 2016-08-03 00:01:17 -04:00
CONTRIBUTING.md Add editorconfig, resolve differences 2016-06-18 03:22:12 -04:00
hyperscript.js Add m.fragment() 2016-08-18 23:34:36 +02:00
index.js Fix the bundle and bundle tests 2016-09-03 23:28:17 +02:00
mithril.js Bundled output for commit 111187cb4f [skip ci] 2016-09-15 20:30:07 +00:00
mithril.min.js Bundled output for commit 111187cb4f [skip ci] 2016-09-15 20:30:07 +00:00
mount.js rename routeresolver methods to {onmatch,view} 2016-08-17 00:10:47 -04:00
package.json 4 spaces != 1 tab 2016-08-18 09:52:36 -07:00
README.md fix event removal in diff 2016-08-12 22:08:02 -04:00
redraw.js rename routeresolver methods to {onmatch,view} 2016-08-17 00:10:47 -04:00
render.js rename routeresolver methods to {onmatch,view} 2016-08-17 00:10:47 -04:00
request.js ensure internal streams have same constructor as public streams 2016-08-24 01:08:20 -04:00
route.js Mount-based api/router.js 2016-09-02 21:59:05 +02:00
stream.js rename routeresolver methods to {onmatch,view} 2016-08-17 00:10:47 -04:00

Mithril.js - A framework for building brilliant applications

Documentation | Migration Guide

Note: This branch is a sneak peek for the upcoming version 1.0. It's a rewrite from the ground up and it's not backwards compatible with Mithril 0.2.x. You can find preliminary documentation here and migration guide here

This rewrite aims to fix longstanding API design issues, significantly improve performance, and clean up the codebase.

Early Preview

You can install this via NPM using this command:

npm install lhorie/mithril.js#rewrite

Examples run out of the box. Just open the HTML files.

Status

The code is fairly stable and I'm using it in production, but there may be bugs still lurking.

Some examples of usage can be found in the examples folder. ThreadItJS has the largest API surface coverage.

Partial documentation can be found in the /docs directory

Performance

Mithril's virtual DOM engine is around 500 lines of well organized code and it implements a modern search space reduction diff algorithm and a DOM recycling mechanism, which translate to top-of-class performance. See the dbmon implementation (for comparison, here are dbmon implementations for React v15.0.2, and Angular v2.0.0-beta.17. All implementations are naive (i.e. apples-to-apples, no optimizations)

Robustness

There are over 4000 assertions in the test suite, and tests cover even difficult-to-test things like location.href, element.innerHTML and XMLHttpRequest usage.

Modularity

Despite the huge improvements in performance and modularity, the new codebase is smaller than v0.2.x, currently clocking at 7.2kb min+gzip

In addition, Mithril is now completely modular: you can import only the modules that you need and easily integrate 3rd party modules if you wish to use a different library for routing, ajax, and even rendering