Million Logo

Lightweight

Framework Agnostic

Blazing Fast

Jamstack Oriented

Compiler Aware

TypeScript Ready

Current Virtual DOM implementations are inadequate—Ranging from overcomplicated to abandoned, most are unusable without sacrificing raw performance and size. Million aims to fix this, providing a library-agnostic Virtual DOM to serve as the core for Javascript libraries that focus on precompilation and static analysis.

With Million, you get the declarativity and flexibility of the Virtual DOM, while leveraging the performance of compiler-aware optimizations.

Overview

import { m, createElement, patch } from 'million';
// Initialize app
const app = createElement(m('div', { id: 'app' }, ['Hello World']));
document.body.appendChild(app);
// Patch content
patch(app, m('div', { id: 'app' }, ['Goodbye World']));

In this example, a virtual node is constructed and a HTMLElement (<div id="app">Hello World</div>) is created out of it. The HTMLElement is attached to the live page, and then patched (updated) using a virtual node (<div id="app">Goodbye World</div>).

Resources & Contributing Back

Looking for the docs? Check the documentation out.

Have a question about Million? Post it on the GitHub Discussions and ask the community for help.

Find a bug? Head over to our issue tracker and we'll do our best to help. We love pull requests, too!

We expect all Million contributors to abide by the terms of our Code of Conduct.

→ Start contributing on GitHub