An overview of JavaScript reactive frameworks
rrees.me
rrees.me
[1] http://elm-lang.org [2] http://elm-lang.org/blog/Blazing-Fast-Html.elm
duckdockgo gave me a bunch of js frameworks with blocks in its name, but not this...
But last time I tried to get into it, the tutorials were all outdated and even the simple hello world didn't work without extensive searching.
Also there doesn't seem to be any examples of how to structure a big app.
var binding = new Ractive{
el: '.where-to-put-it',
data: {some: data},
template: '<p>Put {{ some }} thing here</p>'
}
Bang, two way binding, virtual DOM, and ridiculously fast when using the same benchmarks that ember and react use to test their performance.Compare to something like Knockout.js where you don't write any special code to get the two-way binding (other than creating each data field as an 'observable' field.)
Input field? That's one-way from display => a variable in your viewmodel.
P tag? That's one-way from variable in viewmodel => display.
But when do you really need two-way data binding? Form validation and formatting. Man, this stuff is hard even with two-way data binding. You have to be able to accept, parse, format, and validate all in the same element. It's very helpful to be able to use knockout for a task like this.
<input value={{ some }}>
That's all.
> In your example you'd have to use an input or content-editable element and then call ractive.observe and write your own code for binding user-input to your model data.
Using an input element is enough. Try it.
I thought about moving to a system that uses React or something like it and I looked at a bunch of them, but I'm sticking with Knockout for now because it lets me keep my markup in the HTML document where I personally think it belongs.
I'll probably end up moving to Aurelia (or something like it) because it's so pluggable and you can use it with React or not. There are so many choices right now, it's hard to decide!! Sticking with whatever I pick is also sometimes difficult, but I've been using Knockout for about a year now.
From what I could gather with a quick look, they seem almost identical in terms of features and scope.
Anyone able to provide a quick description of what this means?
Two famous Reactive approaches are FRP and Meteor's reactive computations.
[0] http://blog.vjeux.com/2013/javascript/react-coffeescript.htm...
https://github.com/redbadger/arch/blob/master/docs/02-basic-...
It's also great to see a statement on JS lib proliferation which lays out a concise, balanced and pragmatic argument.