News for hackers. Stuff that matters.
Re:Why I’m throwing out React and going back to Angular 1.x by Lazare on Tuesday March 14, 2017 @05:43PM (#13871732)
TL;DR: Author already knows Angular 1.x, doesn't have the time to learn anything new.

"The stack you already know" is generally a good choice, yes. But the title is misleading and somewhat clickbait; he's not "throwing out" React; he's keeping Angular. He doesn't list any technical advantages Angular 1.x has, and in fact he labels it "obsolete" and says using it in the long term is "suicidal".

A better headline is "sometimes you gotta use the crap stack you have instead of learning a new one"; nothing he says has anything to do with specific frameworks.

Re:Why I’m throwing out React and going back to Angular 1.x by itsdrewmiller on Tuesday March 14, 2017 @06:39PM (#13872145)
That is not an honest tl;dr for this article. A better one would be:

"Wants to move as fast as possible, spent too much time dealing with React tooling, picked Angular 1 from among what he sees as stable options [without a clear reason]".

Or "Angular 1 - the php of javascript frameworks". :-) (Although obviously the php of javascript is jQuery, right?)

Re:Why I’m throwing out React and going back to Angular 1.x by hackerboos on Tuesday March 14, 2017 @06:52PM (#13872243)
If you want to get started quickly then review the fact that you even require a SPA in the first place.

Other than that, you can get started pretty damn fast with create-react-app.

https://github.com/facebookincubator/create-react-app

Re:Why I’m throwing out React and going back to Angular 1.x by breeny592 on Wednesday March 15, 2017 @12:08AM (#13873736)
Someone in the comments of the post suggested the same thing - people who criticise React (or any framework really) of "taking too long to set up" says one of two things to me:

1: they're too picky in what they want to use generators like this (or one of a billion Yeoman templates) - which then says don't complain something takes too long to set up when you're the one adding complexity

2: they count learning new methodologies/frameworks as part of the "setup"

In the case of #2, what you know is always going to be quicker than what you don't. Complaining that "it takes too long" should be rephrased to mean "I don't have the time to learn something new"

Re:Why I’m throwing out React and going back to Angular 1.x by tempVariable on Wednesday March 15, 2017 @09:52AM (#13876062)
Is there an equivalent for this scaffolding app, but for server side PHP or Ruby ?
Re:Why I’m throwing out React and going back to Angular 1.x by headcanon on Wednesday March 15, 2017 @01:47PM (#13878162)
If you're saying "server-side PHP/Ruby API + React SPA frontend", you'll probably be able to find some boilerplates on a github search, but essentially they're just two separate apps at that point, so you're better off just building them that way and maybe tying them together with `make`. If you want server rendered React you can only really do that with Node.js. However the specific architectures/implementations of these apps vary enough its better to make one yourself that suits your needs. create-react-app is designed to have very minimal, bare-bones defaults so you can build whatever opinions you want on top of it.
Re:Why I’m throwing out React and going back to Angular 1.x by tracker1 on Tuesday March 14, 2017 @07:12PM (#13872405)
He did choose PHP for the server-side, so there's that.

jQuery is more consistent and historically nicer to use than PHP... I think even comparing Angular to PHP is a disservice to PHP.

Re:Why I’m throwing out React and going back to Angular 1.x by jacquesm on Tuesday March 14, 2017 @05:48PM (#13871772)
Yes, but that better headline does not have two buzzwords in it.
Re:Why I’m throwing out React and going back to Angular 1.x by sundvor on Tuesday March 14, 2017 @06:25PM (#13872041)
That headline would probably fare a lot better here, though.
Re:Why I’m throwing out React and going back to Angular 1.x by hashmal on Tuesday March 14, 2017 @05:57PM (#13871844)
The vast majority of article titles beginning with "why I..." (and variation) is clickbait. I still don't get why the HN community still falls for this every day.
Re:Why I’m throwing out React and going back to Angular 1.x by cholantesh on Tuesday March 14, 2017 @06:03PM (#13871888)
From this context, I guess one can surmise why his 'real' choices are between Angular, Ember, and ko (which, despite being knowledgeable and positive about Angular, I'd pick if I wanted to iterate fast), but still...not especially meaningful.
Re:Why I’m throwing out React and going back to Angular 1.x by Lazare on Tuesday March 14, 2017 @06:12PM (#13871962)
Yes, Knockout has a lot of drawbacks, but it's really good for rapid prototyping and iteration.
Re:Why I’m throwing out React and going back to Angular 1.x by TheRealWatson on Tuesday March 14, 2017 @06:06PM (#13871911)
I thought he gave his reasons for leaving React behind pretty clearly, no? Mostly around tools and work flow.

These matter to him so I wouldn't just dismiss the article.

Re:Why I’m throwing out React and going back to Angular 1.x by frostirosti on Tuesday March 14, 2017 @05:51PM (#13871797)
Sounds like the typical pretentious, the world is changing and I don't like it. Take the time to learn new technologies and adapt to changing landscapes. Mastering the abstract ideas makes you more flexible.
Re:Why I’m throwing out React and going back to Angular 1.x by coldtea on Tuesday March 14, 2017 @06:05PM (#13871905)
>Sounds like the typical pretentious, the world is changing and I don't like it. Take the time to learn new technologies and adapt to changing landscapes.

Why? Most of the times is fad. Learning some select things well is way better (and more feature proof) than "learning new technologies and adapting to changing landscapes" (e.g. VB in the nineties, Java/C# later, Rails after that, Node now). One could have been a stable salaried top-end engineer in the same, non-shifting, niche the whole time...

Re:Why I’m throwing out React and going back to Angular 1.x by tracker1 on Tuesday March 14, 2017 @07:19PM (#13872453)
JSX and Redux are going nowhere... they'll probably outlive React, though I also think that's going nowhere anytime soon.

Redux (and similar single unidirectional stores) is a paradigm shift, but seeing ever broadening adoption and similar ngrx/store for example in the angular side.

JSX as a compositional representation of a component tree is just plain useful... it's your component markup in your code, instead of code here, style there, markup over there... it's all on concern, the component. Many newer frameworks that differ from React on some technical reasons are using or suggest JSX transforms.

You get that in a more stable platform with React. Add in fetch, react-icons and material-ui you're pretty close to set... start with create-react-app and your off and running, not much, if at all harder than getting angular1 up.

And while Node is no longer growing exponentially, it's still one of the most prolific open communities around (including npm for client-side JS projects).

As to your list.. Java and C# are pretty firmly around today.

Re:Why I’m throwing out React and going back to Angular 1.x by coldtea on Wednesday March 15, 2017 @04:37AM (#13874666)
>JSX and Redux are going nowhere... they'll probably outlive React, though I also think that's going nowhere anytime soon.

Let's check back in 10 years.

>Redux (and similar single unidirectional stores) is a paradigm shift, but seeing ever broadening adoption and similar ngrx/store for example in the angular side.

And in a few years we could have another paradigm shift, with webassembly bringing about e.g. a nicer UI stack for web work.

>As to your list.. Java and C# are pretty firmly around today.

Speaking of Java, that I've followed best, where are Applets? Or J2EE? Or Swing? Or JS Faces? Or that java grid API that would revolutionize computing? Or lots of other Java-related fads du jour that history forgotten, but at the time had loads of adoption and were touted as the best thing since sliced bread?

Re:Why I’m throwing out React and going back to Angular 1.x by tracker1 on Wednesday March 15, 2017 @04:59PM (#13879722)
Not sure, the only things I've dug deeply into are Netscape Livewire (server javascript), Classic ASP (JScript and VBScript), PHP, ASP.Net, Ruby on Rails, Castle Monorail, ASP.Net MVC, Node (express, koa), Backbone, MEAN-stack, React .. some interest in go, rust and .Net Core lately.

Of all the above, React is the first paradigm (combined with a Node backend) that EVER felt like the right way to do things... all others were "Cool", then dig in and get really disappointed somewhere. The more I've gotten into React... (I didn't like a lot of the early flux-like frameworks, but enjoying Redux) the more I feel it's really close to the right way to build web applications.

Of the above, I really disliked PHP and didn't like RoR too much, mostly because I don't care for ORMs at all really, even Entity Framework irks me at times, but at least it's easier to manage than others I've worked with. I've done one-off things with other tools/frameworks, but none really felt right... And this is in two decades of web applications development.

Mongo and RethinkDB feel close to right similarly. Postgres + plv8 feels really close too, but for the clustering.

For now, Web Assembly can't touch the DOM. And I'm only guessing, but it's likely the first implementations that bridge the gap will be around React/JSX or a similar core for the communication, and representation of UI vdom. Soemthing using the `material-ui` package could be awesome.

Re:Why I’m throwing out React and going back to Angular 1.x by nkkollaw on Tuesday March 14, 2017 @07:43PM (#13872581)
What about Polymer and web components?

I think that's the future, not React.

Re:Why I’m throwing out React and going back to Angular 1.x by tracker1 on Tuesday March 14, 2017 @07:47PM (#13872614)
Web components, or something like it may well be the future... But to me the web component structure feels more alien than React.. it's almost the inverse though. Of course, that's once the browsers better support it, and ES6 modules natively is probably the biggest adjacent need, that will be some painful times during the transition.
Re:Why I’m throwing out React and going back to Angular 1.x by discreteevent on Tuesday March 14, 2017 @06:00PM (#13871864)
I think the point of the article was that his goal is to develop his product before he runs out of money. Maybe if his business is a success he can then pursue your suggested goal of improving his abstract thinking and gaining flexibility.
Re:Why I’m throwing out React and going back to Angular 1.x by frostirosti on Tuesday March 14, 2017 @05:58PM (#13871853)
I mean, I do also buy the, 'change is hard, and if Cost(Change) >= Cost(Not change) + delta(x months) then it's not worth it`
Re:Why I’m throwing out React and going back to Angular 1.x by andrewclunn on Tuesday March 14, 2017 @06:30PM (#13872080)
Angular 1: I'll just put all my dependencies in a libs folder so that I don't have to track the node modules folder in my repo.

Angular 2 + tyepescript: Nope. All must be compiled on the fly from the node modules directory. So sayeth the Google.

---

Angular 1: Oh look, stable production ready versions of all the external libraries I need.

Angular 2: Coming soon...

---

Hacker News Comments: Oh somebody prefers Angular 1 to Angular 2? Must be because they're stupid and hate learning new things.