@hellajs/core
v1.0.11
Published
A reactive system that updates automatically when data changes. Uses a reactive dependency graph with efficient propagation and topological execution order.
Downloads
27
Readme
@hellajs/core
A reactive system that updates automatically when data changes. Uses a reactive dependency graph with efficient propagation and topological execution order.
The core package is a heavily modified fork of the excellent Alien Signals library.
Documentation
Quick Start
Installation
npm install @hellajs/coreBasic Usage
import { signal, computed, effect } from '@hellajs/core';
// Create reactive state
const count = signal(0);
const multiplier = signal(2);
// Derive values automatically
const doubled = computed(() => count() * multiplier());
// Handle side effects with automatic cleanup
const cleanup = effect(() => {
console.log(`Count: ${count()}, Doubled: ${doubled()}`);
});
// Logs: "Count: 5, Doubled: 10"
count(5);
// Stop the effect
cleanup();
License
This software is provided "as is" under the MIT License, without any warranties. The authors are not liable for any damages arising from its use.
