Skip to content

aidenybai/hundred

Repository files navigation

💯 Hundred Code Size NPM Version

Hundred is intended to be a toy block virtual DOM based off of Million.js, and is a proof-of-concept and a learning resource more than a tool you should actually use in production.

Install Hundred

Inside your project directory, run the following command:

npm install hundred

Usage

import { h, block } from 'hundred';

const Button = block(({ number }) => {
  return h('button', null, number);
});

const button = Button({ number: 0 });

button.mount(document.getElementById('root'));

setInterval(() => {
  button.patch(Button({ number: Math.random() }));
}, 100);

License

hundred is MIT-licensed open-source software by Aiden Bai.