A pet project exploring how to build a React-like framework from scratch using vanilla TypeScript.
- Declarative UI — Tagged template literals (
html`...``) - Components — Functions returning
DocumentFragment - Event binding — Data attributes (
data-on-click="handler") - State — Pub/sub pattern for reactive updates
const MyComponent = ({ title }) => {
const template = html`<button data-on-click="onClick">${title}</button>`;
const onClick = () => console.log('clicked');
return createElement(template, { onClick });
};yarn && yarn start