5 ms·
For Angular 1 vs. React, I would just say depending on the resources you have - for example if a team is very productive with Angular 1 & there isn't enough tim
by Bahamut 10y ago
For Angular 1 vs. React, I would just say depending on the resources you have - for example if a team is very productive with Angular 1 & there isn't enough time to get a team to pivot skills, then it may make more sense to go with that from a business perspective.
IMO there is one main reason to choose Angular 2 over React currently - perf. Angular 2 has significant perf improvements over the other libraries/frameworks out there, and supports incremental rendering as opposed to React's render all at once model. Angular 2 also will have the best built-in animation support of the various libraries/frameworks out there, in part due to the Angular team's collaboration with the Chrome team (this is true with Angular 1 as well).
Otherwise, React is more mature than Angular 2 & has a simpler API. Conceptually, Angular 2 and React share much in common, and architectures should look similar between well written apps in both.
- bradleyprice 10y agoWhat's the difference between Angular 2 and Reacts rendering? I was under the assumption that Angular 2 had implemented a shadow dom or something similar. Not arguing that you are wrong, I just haven't kept up with any of Angular 2 and am genuinely curios.
- Bahamut 10y agoBoth Angular and React rely on an AST - React uses jsdom, while Angular has a template compiler which constructs an AST from the template, and the renderer then can render from the AST as it determines. Angular can render templates with the inert template tag - this allows it to leverage browser caching for browsers supporting the template tag. It also supports the shadow DOM through its style engine with the component decorator. One can either use native shadow DOM (and use a polyfill for the functionality), or use Angular 2's built-in virtual shadow DOM where it randomly generates unique attributes to style off of with the component decorator.
- 0xfaded 10y agoI'm trying to find more info on angular 2 incremental rendering that you've mentioned. I've despised angular since pre-1.0, mainly for performance reasons. Once the number of watchers hits 1000 or so, a browser will noticeably lag. A compete rerender will cause a noticeable freeze up. I'm not currently using react either, but it's possible to do an incremental render through code, only rendering what needs rendering. React-dom will be needed to plug the result in the right spot.