You are viewing a single comment's thread from:

RE: I love working with React... So WHY am I switching to Angular? Part 2

in #programming7 years ago

Two-way binding can be very powerful and is great when you're quickly setting up CRUD apps. However, in larger applications it can also really come back to bite you in the ass. With dozens of directives and components everywhere changing data back and forth all the time, it becomes harder and harder to keep track of which part changes what data. Bug-hunting isn't as straight-forward anymore because you can't simply set a breakpoint inside a template and see which controller changed that particular value that is acting erratically.

For exactly that reason Angular 2+ now really wants you to use one-way binding and supply callbacks that fire when the data needs to be changed in the other direction (iirc this is roughly what Redux does with state, but Angular does it on a smaller per-component scale).

I realize more and more that I should really learn React, not because it's better per se but because it might help me get familiar with some other patterns and paradigms that might improve my understanding of programming in general.

Sort:  

You're 100% correct. Not having a single source of truth has been the bane of many a developer's existence.
Kudos for learning React and Redux. Exposing yourself to as many patterns as your brain can handle I believe will be of great benefit to you.
Keep on keeping on 😃👍

So why did you switch to Angular? 😜

Read the last 3 sentences of the post 😜