News for hackers. Stuff that matters.
Re:Angular 2 Final Released by awjr on Thursday September 15, 2016 @04:15AM (#12504283)
Of note, Facebook's create-react-app provides an "official' opinionated approach. https://facebook.github.io/react/blog/2016/07/22/create-apps...

There's even a pull request to bring typescript into the mix. https://github.com/facebookincubator/create-react-app/pull/5...

Re:Angular 2 Final Released by Brakenshire on Thursday September 15, 2016 @06:19AM (#12504732)
I'm just writing a first React app, and read beforehand that it was going to be difficult to choose which libraries to use, and to get them to work together, but I haven't found that to be much of an issue in practice.

create-react-app set up all the build tooling, for a router the clear recommendation is react router, and for a flux implementation the clear recommendation is Redux. It feels like there's a well defined path for beginners. Over time you'll have to figure out how everything works, as is always the case, but you can learn more as and when it's necessary.

The bumps were more whether to use ES5 or ES6 (but then I found an official position in favour of ES6), and whether or not you need to use flux (although that was really just learning how flux worked, which wasn't wasted time).

The only uncertainty I have now is whether TypeScript will be necessary/useful in future, and if so how to integrate it.

Re:Angular 2 Final Released by waffleau on Thursday September 15, 2016 @07:34AM (#12505117)
The sanctioned way forward for React is Flow. It's not as comprehensive as TypeScript, but there's no compilation required - Flow annotations just get stripped out. As of a couple of weeks ago it is part of create-react-app.

https://flowtype.org

Re:Angular 2 Final Released by boubiyeah on Thursday September 15, 2016 @12:23PM (#12507445)
Too bad flow doesn't work as well as typescript in practice. It has way more bugs, is not as tested.

It was very promising at first but typescript now has caught up with Flow best design decision: noImplicitAny, strictNullChecks.

Also, check on the "try typescript" website: typescript's JS output is almost left untouched. it's effectively a replacement for babel, if you only care for ES2015 stuff, and not some of the more recent stage 0 / stage 1 stuff.

Re:Angular 2 Final Released by devdoomari on Saturday September 17, 2016 @06:34AM (#12519948)
this. tried flow, but it's too 'smart' for my iMac to handle. Flow reads all JS files without problems - which killed my iMac after using 6>gb ram. a partial solution was to manually set ignore on some node_modules packages. but still, really slow experience with atom/subl/etc.

Compared to this, typescript is actually dumb enough to require ts definition files to actually parse non-ts (js) files.

Re:Angular 2 Final Released by awjr on Thursday September 15, 2016 @06:39AM (#12504810)
Having used TypeScript and also picked up recent projects where it is not being used, TS is definitely the way to go.

The issue is that TS 1.8 doesn't support async/await in the browser until v2.0, but a ts -> babel transpile does the job nicely.

Re:Angular 2 Final Released by Bahamut on Thursday September 15, 2016 @07:15AM (#12505011)
TS 2.0.2 is stable enough for usage I've found, had no issues at all using it so far.
Re:Angular 2 Final Released by boubiyeah on Thursday September 15, 2016 @09:38AM (#12505989)
Yes, typescript betas/rc's are more stable than many products out there :p
Re:Angular 2 Final Released by gbog on Thursday September 15, 2016 @10:25AM (#12506388)
Microsoft stuff not allowed in my stack...
Re:Angular 2 Final Released by hackerboos on Thursday September 15, 2016 @11:19AM (#12506884)
Why? It's Apache 2.0 licensed...
Re:Angular 2 Final Released by gbog on Thursday September 15, 2016 @09:09PM (#12511225)
People seem to have forgotten that MicroSoft was a gigantic threat to our industry, and still is. It owns 98% PCs world wide. What would we think if 98% of gaz stations worldwide where belonging to one company? That would be dangerous, right? Same with MS except it's worse, because PCs are eveyrwhere controlling everything. It's Big Brother in real life. Just imagine one moment how many critical decisions having world wide impact on the life of billions of people are done using Excel? What if Excel was remote controlled?

So, no, sorry, I don't eat that stuff. Bill Gates has built the most dangerous edifice and no amount of charity will save him from the Hell of digital beings.

Re:Angular 2 Final Released by olingern on Monday September 19, 2016 @06:10PM (#12535189)
This is garbage.
Re:Angular 2 Final Released by gbog on Thursday September 15, 2016 @10:20AM (#12506349)
I replaced react-router with route-recognizer. The later is a simple tool your code is using, has proper documentation and stability, and do not get in the way of automated tests with jest. But react-router changed too much (i.e. removed named routes), has a lot of dependencies (browserhistory, etc), has very poor documentation, and did not allow me to do automated testing at the levels I wanted to. Moreover, it is a "framework": you're code lives inside of it, breathes through it, and that's something I dislike greatly (for such a moderate usefulness).
Re:Angular 2 Final Released by boubiyeah on Thursday September 15, 2016 @12:28PM (#12507488)
Agreed, react-router developers try too much to change and add new features to their baby. it has become a bit of a monster. 46KB for a minified router framework...
Re:Angular 2 Final Released by Roboprog on Thursday September 15, 2016 @11:57AM (#12507201)
Good thing you don't have clients demanding IE compatibility. Bye bye ES6 :-(
Re:Angular 2 Final Released by matmo on Thursday September 15, 2016 @01:49PM (#12508217)
Doesn't babel (ES6 --> ES5) solve this issue or is there more to it?
Re:Angular 2 Final Released by Roboprog on Friday September 16, 2016 @12:02PM (#12514937)
You're right. But I've avoided bringing transpiling or polyfill stuff into our big project at work. I'm the only dev at work who really like JS at all, anyway, so I'm trying to keep it simple for the Java-only crowd.
Re:Angular 2 Final Released by sotojuan on Thursday September 15, 2016 @10:48AM (#12506593)
CRA isn't opinionated aside from the config and testing (Jest). It has no router, no Redux, etc.

It was made for demos, proof of concepts, and beginners (at the beginning, maybe not anymore). I don't know how Angular CLI works, but if it works like Ember's, then there's no comparison. Ember CLI generates models, controllers, etc. any kind of thing and it enforces a file and directory structure that makes all Ember apps look the same.

Re:Angular 2 Final Released by plexicle on Thursday September 15, 2016 @10:39AM (#12506506)
Don't have a dog in the fight-- I'm using both React and Angular2 in production. I just wanted to add that create-react-app (which was built by a few guys over a weekend or something like that?) I found to be IMMENSELY more useful than angular-cli.

I know a lot of work has been put in to angular-cli and it's been through a few iterations at this point, but I almost wish they would scrap the whole thing and fork create-react-app.