Million is a lightweight (
<1kb) Virtual DOM. It's really fast and makes it easy to create user interfaces.
Million makes creating user interfaces as easy as React, but with faster performance and smaller bundle size for the end user. By computing the user interface beforehand with a compiler, Million reduces the overhead of traditional Virtual DOM.
Okay cool... but why should I use Million if I can just use Preact if I need something a bit more lightweight?
While alternative libraries like Preact reduce bundle sizes by efficient code design, Million takes it a step further by leveraging compilation to make a quantum leap in improving bundle size and render speed.
Our First Application
src/App.jsx and you should see this:
Open the StackBlitz preview (should be at
XXXXXXXXXXX-local.webcontainer.io), if you see content and you're able to interact with it, you're ready to rumble!
Million does not depend on React, but it does use aliases so that any import from
react is automatically aliased to
million. This means that you can use any React library with Million without any changes, and you can use Million as a drop in replacement for React Vite projects.