About this project

Million.js is a React performance tool distributed as an npm package. Rather than replacing React, it works alongside React and provides a compiler plus optimized virtual DOM implementation. The project's stated approach is to move away from comparing complete element trees during reconciliation and instead generate code that directly updates the DOM nodes associated with changed values. The README explains this with a counter example: React normally renders a component snapshot and diffs the previous and new JSX trees, while Million.js conceptually generates checks such as updating a paragraph only when its count value changes. The project describes this as turning reconciliation from linear tree traversal into targeted, constant-time updates. It states that Million.js can make React components up to 70% faster and links to the js-framework-benchmark for supporting results; that performance figure is a project claim rather than independently verified here. Setup is intended to be automated through the Million.js CLI, which can be run with `npx million@latest`. The CLI installs the package and configures the project. Documentation, an interactive demo, installation help, a Discord community, an issue tracker, and a contributing guide are linked from the README. The repository is organized as a monorepo under `/packages`. Its main modules are: - `million`: the core virtual DOM implementation. - `react` and `react-server`: React compatibility layers. - `compiler`: the compiler for using Million.js with React. - `jsx-runtime`: a JSX runtime for Million.js core. - `types`: shared TypeScript types. The README also links to Million Lint, a related service for finding and fixing performance issues, and to a blog post describing the block virtual DOM internals. Million.js is MIT-licensed and credits blockdom, Voby, ivi, Preact, React, Turbo, and other projects as inspiration.