Re:React is mostly hype
by saskurambo on Sunday August 14, 2016 @01:24PM
(#12286413)
A virtual dom is stupid about the view is only an algorithm that diff 2 trees. A data binding can create a graph of knowledge about the view and can create the best and fast mode for update the view.
Library like ractive and vue are the best tools for create animations in svg or where there are many updates of view
Re:React is mostly hype
by qwertyuiop924 on Sunday August 14, 2016 @01:50PM
(#12286543)
...Which is why Mithril and React provide escape valves, for situations in which the VDOM abstraction is ill suited.
Re:React is mostly hype
by saskurambo on Sunday August 14, 2016 @01:10PM
(#12286348)
Yes but generally speak you must do all this things manually and also optimizatio s and binding you must know what updates. In a real 2way db this is automatic also for performance.
Re:React is mostly hype
by qwertyuiop924 on Sunday August 14, 2016 @02:02PM
(#12286588)
No, the perf's pretty bad if you do a lot of binding, and the manual binding gives you a better sense of what your app is doing, the performance tradeoffs you're making, and more control over an area where you'll probably have to optimize.
Re:React is mostly hype
by saskurambo on Sunday August 14, 2016 @04:42PM
(#12287242)
Vue.js 2 is an hibrid between virtual dom and data binding.
Re:React is mostly hype
by qwertyuiop924 on Sunday August 14, 2016 @07:00PM
(#12287710)
All VDOM systems are. The difference is how explicit the data binding is: I maintain implicit 2-way binds, Angluar style, are a Bad Idea.
Re:React is mostly hype
by saskurambo on Monday August 15, 2016 @05:33AM
(#12289418)
Mmm no sorry i don't agree. For me virtual dom is only a tree generated from code,diffed and batched. Speaking only of the algoritm.
For me databining templates libraries are vue and ractive.
See this 2 links for comparison.
https://vuejs.org/guide/comparison.html
http://blog.ractivejs.org/posts/whats-the-difference-between...
Re:React is mostly hype
by qwertyuiop924 on Monday August 15, 2016 @08:02AM
(#12289859)
That's true, but what I meant was that all VDOM based systems have binding to some degree, and where optimization is required, explicit is better than implicit.
It's easy enough to write two way binding into a react state variable, it's just nice to not have it happen by default since having state able to change anywhere in the app can get confusing.