ripplejs/ripple

FRP constructs

Opened this issue · 1 comments

Just read this excellent post: https://gist.github.com/staltz/868e7e9bc2a7b8c1f754

Seems like some of this stuff would be a good fit for ripple or maybe as plugins. What are your thoughts?

Could be kinda cool to use streams for a lot of the data flow. Would be pretty easy to make a plugin to return a stream of data changes, so attributes were actually observable streams of values.

The bindings could just use those streams instead and each view could be a stream as well.

An event stream plugin would be nice for handling DOM events:

<a on-click="{{this.action}}">Click</a>
View.prototype.action = function(stream){
  stream
    .pipe(throttle(250ms))
    .map('a > 2')
    .map(this.clicked);
};