siggie
v1.0.0
Published
A small reactive runtime for JavaScript
Downloads
31
Readme
Siggie
A small reactive runtime for JavaScript.
npm install siggieimport { computed, effect, signal } from "siggie";
const price = signal(10);
const quantity = signal(2);
const total = computed(() => price.value * quantity.value);
effect(() => {
console.log(total.value);
}, true);
price.value = 12;
quantity.value = 3;API
signal(value)creates a writable signal.computed(fn)creates a lazy computed signal.effect(fn, sync?, scope?)creates an effect and returns its disposer.batch(fn)groups writes and coalesces synchronous effects.flushSync()drains queued effects.- Read
.peekwithout creating a dependency. - Assign
.eqto customize equality.
Development
npm test
npm run benchBenchmark results are in benchmarks/RESULTS.md.
