FormaJS

Reactive DOM library with fine-grained signals, islands architecture, and SSR hydration. ~15KB gzipped.
Install
npm install @getforma/core
Quick Start
import { createSignal, h, mount } from '@getforma/core';
const [count, setCount] = createSignal(0);
mount(() =>
h('button', { onClick: () => setCount(count() + 1) },
() => `Clicked ${count()} times`
),
'#app'
);
Features
- Real DOM —
h() creates actual DOM elements with reactive bindings. No virtual DOM, no diffing overhead.
- Fine-grained reactivity — signals, effects, computed values via alien-signals. Only what changed updates.
- Islands architecture —
activateIslands() for independent hydration of server-rendered HTML regions.
- SSR hydration —
adoptNode() walks server-rendered DOM and attaches reactive bindings without re-creating elements.
- Conditional rendering —
createShow(), createSwitch() with branch caching for O(1) toggle.
- List rendering —
createList() with LIS-based keyed reconciliation, handles 50K+ rows.
- State management —
createStore() with deep reactivity, history, persistence.
Ecosystem
License
MIT