Contents
- Welcome to Domma Reactive
- 01 Getting started
- 02 Reactive state
- 03 HTML and bindings
- 04 Components
- 05 Reference
Installation
Updated by Darryl Waterhouse on 17 October 2026 · 1 min read
npm install domma-reactive
import {observable, computed, effect} from 'domma-reactive'; // ESM
const {observable} = require('domma-reactive'); // CommonJS
Or as a plain script - the UMD bundle exposes the global DommaReactive:
<script src="node_modules/domma-reactive/dist/domma-reactive.min.js"></script>
<script>
const count = DommaReactive.observable(0);
</script>
| File | Format | Size |
|---|---|---|
dist/domma-reactive.min.js |
UMD, minified - browser, <script> |
65 KB, 21 KB gzipped |
dist/domma-reactive.cjs |
UMD - require() |
65 KB |
dist/domma-reactive.esm.js |
ES module, unminified - import |
336 KB (comments intact; your bundler minifies) |
TypeScript declarations ship in the package - nothing to install from @types. observable(0) is an
Observable<number>, and assigning to a read-only computed is a compile error rather than a runtime warning.
The reactive core (observable, computed, effect, expressions, contexts, the renderer) needs no DOM and runs in
Node or a worker. Only the compiler functions touch document, and only when called.
A complete browser file
The first-page tutorial provides a complete HTML file using a CDN import pinned to version 1.3.1. It is the quickest way to check your browser setup without a bundler.
The npm package declares Node 24 or later. The reactive core can run without a DOM; rendering and DOM-binding examples need browser DOM APIs.
For a strict Content Security Policy, serve the package from your own origin and load application JavaScript from a separate module file. The binding expression language does not need unsafe-eval. A CDN import still needs that CDN permitted by your policy, and inline module scripts need their own policy permission.