Giter Site home page Giter Site logo

millionone's Introduction

⚠️ This is a very early stage demonstration of React 18 support. ⚠️

⚛️ Million + React

Write the same modern React with a faster Virtual DOM

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.

Think of it as if React's API and Svelte's compiler had a baby. A baby with super speed! 👶

Refer to the Million docs for Virtual DOM and the React docs for the API

Quick Start

The easiest way to use Million is to open it in StackBlitz:

Open in StackBlitz

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 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 open-source software and research project by Aiden Bai.

millionone's People

Contributors

axelhuizinga avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.