11 ms·
I've used knockout.js for a few years now on multiple projects. As knockout grows, I started to dream of a library that would provide me with a two-way data bin
by gdrulia 11y ago
I've used knockout.js for a few years now on multiple projects. As knockout grows, I started to dream of a library that would provide me with a two-way data binding. But not only between data object and DOM, but between data objects itself, like ko.computed does.
This seems like a nice solution, although like other commentators mentioned, the lag seems to be quite unbearable. So it might be just something towards right path and hopefully it will be maintained and updated to work more smoothly, but wont grow into full framework.
- cheapsteak 11y agoHave you looked at Vue? http://vuejs.org/api/options.html#computed http://vuejs.org/api/options.html#computed computed: { foo: function () { return this.a + this.b; }, bar: function () { return this.foo + this.zot; } }
- muraiki 11y agoI use knockout.js at work and like it quite a bit. But I think that I've found what you're looking for, or something close to it, in Reactive Extensions. It's a free library available for many languages including JS. With it you can compose UI interactions, promises, and other arbitrary events in an FRP-like way using observers. An example probably explains it best: http://jsfiddle.net/nmd88wum/ http://jsfiddle.net/nmd88wum/ If that piques your interest, check out: https://gist.github.com/staltz/868e7e9bc2a7b8c1f754 https://gist.github.com/staltz/868e7e9bc2a7b8c1f754