News for hackers. Stuff that matters.
Re:Version 6 of Angular Now Available by antonkm on Saturday May 05, 2018 @02:12AM (#17000596)
Was a firm believer in Angular when it was version 2, made the switch to React before Angular version 4. Best choice I've done for productivity.
Re:Version 6 of Angular Now Available by stupidcar on Saturday May 05, 2018 @05:33AM (#17001056)
I'd offer the opposite perspective: I started a recent app in React, and I wish I'd stuck with Angular.

The core of the React render model is beautiful. It's far quicker to start writing and using a new component in React than in Angular, and the functional nature of React components feels good and highly productive. At first.

But the problem is, around that beautiful core, the React community has built a mass of libraries, meta-frameworks, techniques and practices that are decidedly less beautiful. After a while, I really found myself missing features from Angular, and struggling to replicate them by wiring together a hodge-podge React++ framework. Instead of being productive, I was wasting an inordinate amount of time trying to discover what the current micro-framework de-jour was for handling a particular problem in React.

For example, Angular supports view encapsulation. So you can write CSS targeting a component, and the framework will ensure that the style rules you write apply only to the HTML rendered by that components, without leaking to other parts of the app. This really is a godsend for properly isolating components in a reusable way. With React, there's a myriad of libraries for doing CSS, but most seem to be abandoned, and none seem to offer as straightforward or as easy style encapsulation as what Angular provides out of the box.

It was a similar story with forms. Which are a rich, reactive API in Angular, but seem to be an afterthought in React. And with dependency injection, both of singleton services and components elsewhere in the hierarchy.

I expect if you go all in on Redux, you can eventually build up a reasonable facsimile of what Angular provides. But from a standing start I think Angular is a much more productive framework, just because it's actually trying to be a framework, whereas React seems to be stuck somewhere between being a UI library and a framework, leaving the community to somewhat badly fill in the gaps.

Re:Version 6 of Angular Now Available by Bizarro on Saturday May 05, 2018 @12:19PM (#17002450)
But the problem is, around that beautiful core, the React community has built a mass of libraries, meta-frameworks, techniques and practices that are decidedly less beautiful.

This is exactly what I have found working with React for the past couple years. Once you factor in the React ecosystem, things get messy/ugly and decidedly unproductive.

I'll most likely be moving on to Vuejs.

Re:Version 6 of Angular Now Available by jontro on Saturday May 05, 2018 @07:35AM (#17001377)
For view encapsulation I really recommend using https://github.com/styled-components/styled-components We use this in all our react projects and we haven't had any problems since with leakage
Re:Version 6 of Angular Now Available by chrisco255 on Saturday May 05, 2018 @06:47AM (#17001263)
React's functional components and JSX abstraction lend to it's ability to render to any target, which is powerful in and of itself. Furthermore since they are all-in-one functions or classes, they are composible and flexible in a way that Angular components are not. The component is the core of a complex UI program. Worth the up front cost of researching the top one or two solutions for forms or CSS management, and gaining all the benefits of the massive React ecosystem, in my opinion, as well as having the flexibility to evolve more easily when things change (as they always do), than buy all in on a framework. Especially for long lived applications, flexibility and adaptiveness is paramount.
Re:Version 6 of Angular Now Available by azr79 on Sunday May 06, 2018 @06:21AM (#17005931)
Exactly my experience, when they've introduced Context API in the latest version of react (16.3?) I and was seeing all these blog posts about them on all my feeds, i looked them up and tried to understand what the fuss was all about, and when I finally understood, I was like "Ok so it's solving exactly the same problem that @Injectable Services solve, but in a way more convoluted manner)
Re:Version 6 of Angular Now Available by city41 on Saturday May 05, 2018 @11:26AM (#17002191)
I like the flexibility React provides. I’m working on two React apps right now. One using Apollo and the other Redux. The two libraries fit each app’s unique needs very well. One app really is a single page (it’s a drag and drop design tool) and so doesn’t have a router. I like that I can just bring in exactly what I need.
Re:Version 6 of Angular Now Available by smuemd on Saturday May 05, 2018 @08:09AM (#17001463)
Check out this pattern http://meiosis.js.org

Works great along w react

Re:Version 6 of Angular Now Available by azr79 on Sunday May 06, 2018 @06:25AM (#17005936)
And that's exactly what he's talking about, and how many patterns do you have? Because we only have one, the Angular way, you can't imagine how an opinionated framework simplifies the life of working in large teams and hiring new people that can be productive quickly because they all pretty much follow the same design guidelines
Re:Version 6 of Angular Now Available by PunchTornado on Saturday May 05, 2018 @08:29AM (#17001524)
your comment proves his point exactly.
Re:Version 6 of Angular Now Available by pygy_ on Saturday May 05, 2018 @11:55AM (#17002326)
The Meiosis pattern cristalizes the essential complexity of centralized state management (flux/redux), with no boiler plate, and little to no extra library code...

How does that prove his point?

Re:Version 6 of Angular Now Available by kreck on Saturday May 05, 2018 @06:09AM (#17001143)
We started with Angular.js (1) and then migrated all our projects to 2+ as soon as it left beta. At this point we also evaluated react and later took a look at vue. The main reason why we stick with Angular are the baked-in best practices and the tooling (angular-cli). Especially if you work on larger projects and have several people working on them, (opinionated) Angular simply makes your life a lot easier. With react (and vue) you have to make so many small decisions when setting up your project, that especially less experienced developers are tempted to make potentially "bad" design decisions (e.g. testing framework, bundling, routing, state management, ... you name it).
Re:Version 6 of Angular Now Available by chrisco255 on Saturday May 05, 2018 @06:35AM (#17001227)
At this point in React's lifecycle, there are one or two top choices for each category you mention (ie MobX vs Redux, Jest vs Jasmine, etc) for folks worried about making "bad choices" well I would ask, what makes a choice bad? Is it that a particular state management library is a bad fit for your application? In that case, where it's possible that a library is a bad fit, then how can it be that a one-size-fits-all framework is going to not equally have potential to be a "bad" choice, except with a lot more buy in and difficulty to change down the road?
Re:Version 6 of Angular Now Available by smrtinsert on Saturday May 05, 2018 @10:17AM (#17001888)
Just left an angular job. Got lots of calls about it. Told them i wanted nothing to do with it. Very happy with that decision.
Re:Version 6 of Angular Now Available by Griever on Saturday May 05, 2018 @11:45AM (#17002266)
What were your main issues with Angular? I've been using it over the last year or so (coming from a React background) and I must say I'm quite pleased with how well it works for the team and I.
Re:Version 6 of Angular Now Available by noir_lord on Saturday May 05, 2018 @04:25AM (#17000920)
Same, they handled the transition terribly, I really wanted to use angular but I stuck with knockout and then ended up going to VueJs instead.
Re:Version 6 of Angular Now Available by tarellel on Saturday May 05, 2018 @09:37PM (#17004857)
I've gone to using VueJS full-time as well and it's been absolutely amazing at increasing my productivity.
Re:Version 6 of Angular Now Available by noir_lord on Wednesday May 09, 2018 @02:15PM (#17032325)
What I really like with SFC's is that with some thought you get genuinely scoped components meaning you can build your UI much like something like XAML/WPF which for the kind of interfaces I build is fantastic.

Combined with QuickType, C# and TypeScript it's productive as hell.