Guide · Open source
How to use Million.js: install, set up and speed up React
Updated · written with AI from the project's own documentation and checked against our catalogue data
Million.js is an open-source optimizing compiler for React, written in TypeScript and licensed under MIT. It aims to make React components update faster by generating code that changes the DOM directly instead of diffing snapshots. This guide walks through what it needs, how to install it with the CLI, how it works and when it is a good fit.
Quick start
- 1Check prerequisites. Confirm you have Node.js and an existing React project.
- 2Run the CLI. From your project folder, run npx million@latest to install and configure Million.js.
- 3Start your project. Run your project as you normally would and check the command line for Million.js output.
- 4Measure the baseline. Note how your key screens perform before you rely on any speed claims.
- 5Compare after setup. Test the same screens again and compare results against your baseline.
What do you need before you install Million.js?
The README lists two prerequisites: Node.js and an existing React project. Million.js is meant to work inside a React codebase, so it does not help if your project does not use React.
- Node.js installed on your machine
- A React project you want to speed up
How do you install Million.js with the CLI?
The Million.js CLI installs the package and configures your project for you. Run the command from your project. According to the README, once the setup finishes you run your project and information should appear in the command line.
If installation fails, the README points to a separate installation guide on the project docs site.
- Run the command from the root of your React project
- Start your project as usual after setup finishes
- Check the installation guide if setup fails
npx million@latestHow does Million.js make React updates faster?
React normally renders a snapshot of your components and then diffs the old and new snapshots to find what changed. The README says this reconciliation step gets slower as the number of JSX elements grows.
Million.js compiles your components so that, when state changes, the affected DOM node is updated directly. The README describes this as skipping the diffing step and turns reconciliation from O(n) to O(1) in its conceptual example.
- Rendering: React calls your component function to produce a snapshot
- Reconciliation: React compares snapshots to find differences
- Million.js: the compiler updates only the affected DOM nodes
What speed gains can you expect?
The README claims components can be up to 70% faster, linking to an external js-framework-benchmark page. The README does not describe the test conditions, so treat the figure as the project's claim rather than a guaranteed result for your app.
The best way to check is to measure your own app before and after adding Million.js.
- Measure a representative screen before changing anything
- Compare the same screen after setup
- Look at the benchmark link to understand what was tested
Where can you find more help?
The README links to the project documentation, a video, a Discord community and the issue tracker on GitHub. The Contributing Guide and Code of Conduct are also linked for people who want to help the project.
For a bug, the README asks you to use the GitHub issue tracker.
- Documentation on the Million.js site
- Discord for community questions
- GitHub issue tracker for bugs
- Contributing Guide for pull requests
What people use it for
- Speeding up a dashboard with many elements that update often
- Trying compiler-based optimization in an existing React app without rewriting components
- Experimenting with Million.js in a side project to learn how React reconciliation works
Frequently asked questions
Is Million.js free to use?
Yes. Million.js is licensed under the MIT licence, as stated in the project information. You can check the LICENSE file in the repository for the full terms.
What does Million.js require?
The README lists Node.js and a React project as prerequisites. It is described as a compiler for React, so projects that do not use React are not a fit.
How do I install Million.js?
Run npx million@latest in your React project. The CLI installs the package and configures your project. If you hit problems, the README links to an installation guide.
Is Million.js really 70% faster?
The README claims components can be up to 70% faster and links to an external benchmark. It does not explain the test conditions, so measure your own app to see the real effect.
How does Million.js compare to React Compiler, Preact or Solid?
Million.js focuses on speeding up React updates through a compiler. React Compiler, Preact and Solid are alternatives that approach performance differently. This guide does not benchmark them against each other, so compare them on your own app.
Where do I report a bug in Million.js?
The README asks you to open an issue in the GitHub issue tracker for the aidenybai/million repository. You can also ask questions on the project's Discord.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Million.js suits React developers with many frequently updating elements who want a performance boost without rewriting components, or who want to experiment with compiler optimizations. Skip it if you do not use React, are a beginner building a simple site, or need a verified performance gain, since the 70% claim comes from the project's own benchmark link without detailed conditions.
Install options & downloads