Introduction
A standalone, framework-agnostic reactive utility library.
Most reactivity systems are locked inside UI frameworks (React, Vue, Solid). If you want signals and effects in a Node.js script, a game engine, a web worker, or a vanilla JS project, you're stuck importing a framework's internals.
The Core Idea
Ripple.js is reactivity as a utility, not a framework byproduct. It gives you fine-grained reactive primitives that work anywhere JavaScript runs.
The Problem We Solved
Think of how Zod solved schema validation. Before Zod, validation was scattered across Express middleware and Mongoose schemas. Zod made validation a standalone utility.
Ripple.js does the same for reactivity. It provides the exact same signals, computed values, and effects that power modern UI engines, extracted into a universal toolkit.
- Fine-grained reactivity — Signals, computed values, and side-effects.
- Framework-agnostic — Works seamlessly in Browsers, Node.js, Deno, Bun, and Web Workers.
- Tiny & Dependency-free — ~3.5KB minified + gzipped with zero transitive bloat.
- Batteries included — Stores, undo/redo history, persistence, and collections built-in.
- Framework adapters — First-class React, Vue 3, and Svelte hooks when you need them.
Glitch-Free Architecture
Ripple.js utilizes a highly optimized push-pull hybrid reactive engine:
- Push Phase: When a signal mutates, dirty flags propagate downstream instantly.
- Pull Phase: Computed values evaluate lazily only when explicitly read.
This guarantees glitch-free propagation with no intermediate stale values, even in complex diamond dependency graphs. Memory footprint is strictly controlled using intrusive doubly-linked lists and link pooling, resulting in ~60% fewer Garbage Collection (GC) allocations compared to standard array-based dependency tracking.