Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FRP constructs #37

Open
matthewmueller opened this issue Jul 1, 2014 · 1 comment
Open

FRP constructs #37

matthewmueller opened this issue Jul 1, 2014 · 1 comment

Comments

@matthewmueller
Copy link
Contributor

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?

@anthonyshort
Copy link
Contributor

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);
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants