realar-project / realar

5 kB Advanced state manager for React
MIT License
44 stars 0 forks source link

proposal: chain #92

Closed betula closed 3 years ago

betula commented 3 years ago

Think about "chain" abstraction

const a = value(0);
const b = chain(() => a.val);

assert(b.val === undefined);
a(5);
assert(b.val === undefined);

b.input.to(b.output); // "to" better than "watch"
a(6);
assert(b.val === 6);
betula commented 3 years ago

Added to "the stream of conciseness 0.7+ roadmap"