Git Product home page Git Product logo

million's Introduction

What is Million?

Million is a lightweight (<1kb) Virtual DOM. It's really fast and makes it easy to create user interfaces.

Oh man... Another /virtual dom|javascript/gim library? I'm fine with React already, why should I bother switching?

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! πŸ‘ΆπŸš€

πŸ“š Learn Million in 1 minute! β†’

Why Million?

Advantages

Use Cases

  • βš›οΈ Familiar React API (with million/react)
  • 🦁 Built for libraries that compile
  • πŸ“¦ Lightweight bundle size (<1kb brotli+min)
  • ⚑ Fast runtime operations
  • πŸ› οΈ Composable using drivers, sensible by default

Note: Million now supports experimental React compatibility.

Installing Million

Inside your project directory, run the following command:

npm install million

Codebase

This repo is a "mono-repo" with modules. Million ships as one NPM package, but has first class modules for more complex, but important extensions. Each module has its own folder in the /packages directory.

Module Description
million The main Virtual DOM with all of Million's core.
react A module that gives React compatability for Million.
router A module that enables SPA routing for MPAs.
jsx-runtime A module that provides JSX runtime utilities
html A module that provides factory functions and tagged template for easier virtual node creation (JSX alternative)
morph A module for morphing HTML with just DOM nodes (like morphdom) inside the page. Works great for implementing hot refresh in SSR frameworks
utils A module that provides conversion utilities for virtual nodes, DOM nodes, and HTML strings
vite-plugin-million A Vite plugin that optimizes virtual node tree ("the compiler")

Resources & Contributing Back

Looking for the docs? Check the documentation out.

Want to talk to the community? Hop in our Discord and share your ideas and what you've build with Million.

Have a question about Million? Post it on the Discord or GitHub Discussions and ask the community for help.

Find a bug? Head over to our issue tracker and we'll do our best to help. We love pull requests, too!

We expect all Million contributors to abide by the terms of our Code of Conduct.

β†’ Start contributing on GitHub

Acknowledgments

Million takes heavy inspiration from snabbdom, ivi, mikado, and more. Feel free to check them out if you're interested in an alternative library to use.

Million is being used at companies like Wyze and open source work like Quartz, TinyPages, and more.

Sponsors

Theatre.js Vercel Deta

Want your logo here? β†’ Sponsor Million

License

Million is MIT-licensed open-source software and research project by Aiden Bai.

View count

million's People

Contributors

0xacn avatar aidenybai avatar cbbfcd avatar danielskatz avatar dependabot[bot] avatar fabiancook avatar felippe-regazio avatar fltenwall avatar fossabot avatar ftonato avatar huozhi avatar joshgillies avatar julianxhokaxhiu avatar oliviertassinari avatar quiibz avatar ricardobeat avatar stan-kondrat avatar sukkaw avatar vladdoster avatar willdoescode avatar

Watchers

 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.