re: Top JavaScript Frameworks For 2019 VIEW POST

TOP OF THREAD FULL DISCUSSION
re: In regards to Angular, you wrote, "Supports two-way data binding which greatly minimizes the risk of errors." Two way data binding can actually c...
 

Two-way data binding is just a shorthand for the double one-way data binding you do in React.

  • From view-model to view: either dirty-check, proxy or wrap the property in a getter/setter.
  • From view to view-model: listen for specific DOM events (most notably, change)

In React you need to manage the synchronization yourself. A framework can do this properly for you (I'll name Aurelia since that's what I use and work on) without sacrificing on control or flexibility.
A framework supporting two-way binding out of the box will typically have a more robust mechanism than the variant you'll write by hand, which everyone might do a little differently.

I would therefore say that two-way data binding does indeed minimize the risk of errors, granted it is done well. It also reduces boilerplate (resulting in a smaller and easier to maintain app) and tends to improve performance (Aurelia outperforms React by over a factor of 3 in binding/observation, although that has more to do with the use of observers instead of a VDOM)

code of conduct - report abuse