Skip to content

Latest commit

History

79 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Component

A tiny (~30 KB), zero-dependency reactive component framework with a React-like hooks API, built for the modern browser — no build steps or bundlers required.

Why it's cool

  • Cooperative Scheduling: Never block the main thread again.
  • Generator-based Yield-Diffing: The VDOM implementation uses generators to slice reconciliation work into non-blocking chunks.
  • Pure JavaScript: Standard ESM imports. No JSX, no Babel, no headaches.
  • Familiar API: Class components and functional hooks (useState, useEffect, useRef) that you already know.

Quick Start

import{Component,useState,html,mount}from'//js.imlin.us/component'classCounterextendsComponent{render(){const[count,setCount]=useState(0)returnhtml`<buttononclick=${()=>setCount(count+1)}> Count is: ${count}</button> `}}mount(Counter,'#app')

Learn by Example

Dive into the curated example apps to see the framework in action:

  • Todo App - The basics: State, lists, and forms.
  • Notes App - Advanced: Persistence, functional components, and composition.
  • Weather App - Real-world: Async data fetching and effect cleanups.

Made with 💜 by and for imlin.us. But feel free to use it!

About

Reactive component framework with generator-based yield-diffing

Resources

Stars

7 stars

Watchers

2 watching

Forks

Used by

Contributors

Languages