Ultra light-weight JavaScript reactive programming library.
const foo = Reactive.var(0);
Reactive(() =>
console.log(foo.get()) //or via primitive call +foo
);
setInterval(() => foo.set(foo + 1), 500);
const foo = Reactive.object({bar: 0});
Reactive(() =>
console.log(foo.bar)
);
setInterval(() => foo.bar++, 500);
const foo = Reactive.proxy();
foo.bar = 0; //every defined proxy property is reactive
Reactive(() =>
console.log(foo.bar)
);
setInterval(() => foo.bar++, 500);
const foo = Reactive.array(1, 2, 3, 4);
Reactive(() =>
console.log(foo.join())
);
setInterval(() => foo.push(foo.length + 1), 500);
Install via npm
$ npm install justreactive --save