Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bdombro/million-react
A demonstration of Million Dom + React Compat
https://github.com/bdombro/million-react
Last synced: 5 days ago
JSON representation
A demonstration of Million Dom + React Compat
- Host: GitHub
- URL: https://github.com/bdombro/million-react
- Owner: bdombro
- Created: 2022-12-23T17:40:54.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-23T17:40:56.000Z (about 2 years ago)
- Last Synced: 2025-01-01T18:55:37.237Z (10 days ago)
- Language: CSS
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
> ⚠️ _This is a very early stage demonstration of React 18 support._ ⚠️
# ⚛️ [Million](https://github.com/aidenybai/million) + React
### Write the same modern React with a faster Virtual DOM
Million makes creating user interfaces as easy as [React](https://reactjs.org), 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](https://preactjs.com/) if I need something a bit more lightweight?
While alternative libraries like [Preact](https://preactjs.com/) 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.
Think of it as if [React](https://preactjs.com/)'s API and [Svelte](https://svelte.dev/)'s compiler had a baby. [A baby with _**super speed! 👶**_](https://millionjs.org/benchmarks)
> Refer to the [Million docs](https://millionjs.org) for Virtual DOM and the [React docs](https://beta.reactjs.org/apis) for the API
## Quick Start
The easiest way to use Million is to open it in StackBlitz:
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/aidenybai/million-react)
If you want to use it locally, you can either fork the project, or clone it directly.
```
git clone https://github.com/aidenybai/million-react.git
cd million-react
npm install
```Once you've done that, open `src/App.jsx` and start tinkering!
## Usage
This is a Vite project. There are two ways to run it:
- `npm run dev`: runs the project in development mode.
- `npm run build`: bundles the project for production.## Limitations
While the majority of commonly used React API features are supported, such as state, components, fragments, etc., there are more advanced features that may not be supported.
For instance, while class components are supported, some lifecycle methods are not or act as passthroughs.
Additionally, because [React Fiber](https://www.velotio.com/engineering-blog/react-fiber-algorithm) is not supported by default, some features, particularly Suspense, are implemented only as passthrough components.
Some libraries in the React ecosystem may not work out of the box with Million.
_TL;DR: The best way to see if something is supported is to import and try it._
## License
Million is [MIT-licensed](https://github.com/aidenybai/million/blob/main/LICENSE) open-source software and [research project](https://arxiv.org/abs/2202.08409) by [Aiden Bai](https://aidenybai.com).