of the box • No depending on a third-party library which might become unsupported in the future • Rigidly opinionated • Less dev disagreements on code structure • Forces Typescript adoption • Angular/Core is more comparable with React
prod bundle. • Angular - 1.2m dev bundle. 200k prod bundle. • In development Ivy Renderer with tree shaking can have a 4K Hello World •Both support Server Side Rendering
No Higher Order Components • No Mixins • In development “Ivy Renderer” makes it possible. But • Client Code may require rewriting to use • Loss of Tooling. No Enforced Code Style
• Two Way bindings lead to spaghetti code • NgRx takes inspiration from Redux but incorporates RxJS. Another is NGXS which also uses modern TypeScript features • RxJS is great for HTTP calls. • React • One Way Bindings. Functional Views. • Redux. Many others • React wins big here.
Functional Views, and Functional Components, which are Pure & Stateless. Very easy to Use and Test. • Hooks allow state management in pure components • Immutable data structures • Virtual-Dom abstracts away lots of complexity • Angular’s 2 Way Data Binding is much messier. It has third party support for Virtual-Dom, via ng- vdom. But it is not recommended.
fast Javascript • Angular Template Syntax is bad • But Side Effect Free, which is great! • Compiled to Javascript when in AOT mode. More Complex. https://angular.io/guide/aot-compiler • Angular, you should use the third party TSX instead of inbuilt templating solution
Doesn’t need it. but more work. https://blog.mgechev.com/2017/01/30/implementing- dependency-injection-react-angular-element-injectors/ • But I would recommend not injecting dependencies anyways. Just pass props/function args to React components. Also you can pass functions/components themselves. • React “Contexts” allow auto passing props down a tree of components. Should be used sparingly.
shaking (4K hello world app). Easier build pipeline. Easy lazy-loading components. Meta Programming. •React – Fiber. Hooks. Suspense. All the meta programming capabilities provided by Ivy are already in React.
web search. • Lots of new concepts in Angular - Typescript, RxJS, DI, Decorators, Components, Services, Templates, Directives. etc. Pipes, AoT compilation, Change detection. • Onboarding on React is definitely easier.
application to use the dependency. Uses Angular “Schematics” which are like templates for making changes to the code. Schematics are also very helpful in automatically migrating code to new versions. • Debugging • Augury. Good Debugger for Angular. • React Dev Tools, Redux Dev Tools.
to bang something out in React • For Large projects, with long lifetimes, with developer churn, Angular provides stability. (But does it?) • If new dev experience is important, React is better • If multiple platforms (web, mobile, desktop, embedded) will be targeted, then React will have better support • If no experienced developers are present initially to guide the project, then Angular may be a better choice • Server side rendering? Microservices? React. • Will libraries be updated regularly? If not, then Angular may be better supported • If 3rd party library/component ecosystem is important then React has more integrations