6 ms·
I heard angular is a framework and react is lib. angular 2 or react. Coming from nodejs, python, php, jquery experience which should I learn?
by taesu 10y ago
I heard angular is a framework and react is lib.
angular 2 or react.
Coming from nodejs, python, php, jquery experience which should I learn?
- hathym 10y ago+1 for react
- softinio 10y agoBoth :-)
- kimshibal 10y agoIgnore both. Learn vue.js to get shit done.
- sdegutis 10y agoThat doesn't address the issues the comment just above you (at time of writing) brings up, namely that even with Vue you still need to set up all the tool chain around it, whereas Angular brings a lot of that to the table for you.
- kimshibal 10y agoI handle a big React app at my job. It's messy as fuck with JSX. We made a transition to Vue. Couldn't be happier.
- hugozap 10y agoWhat in particular about JSX makes it messy compared to vue? Messy template code can happen in both.
- clivestaples 10y agoVue templates support conditional rendering (v-if/v-show/v-else) which I didn't realize I missed until using them. Also, conventions around component data are really nice and help keep markup tidy and very readable. I like to think of Vue as React with sensible conventions. That said, both are terrific and solve UI problems very elegantly.
- troncheadle 10y agoReact handles conditional rendering better imo. You use regular JS instead of having to learn a new API. You can use control logic in your render methods to great effect.
- clivestaples 10y agoI definitely agree that React is clean for the reasons you state and I always enjoy building UIs with it. I suppose my comment was just a reflection on the differences that I found refreshing - to my surprise.
- sotojuan 10y agoSo it's your engineer's fault. Plenty of companies get stuff done with React everyday.
- huskyr 10y agoIf you want, you can use Vue.js just like jQuery. Pop it in a <script> tag and you're done. No tool chain needed. I do that all the time for small-medium sized projects and it works absolutely fine.
- ausjke 10y agoWordpress goes with react, drupal picks angular2, and laravel favors vuejs. This is no surprise, wordpress is extremely popular these days for all users, a huge angular2 client framework might be an overkill for many of its users. Drupal on the other hand is doing the more complicated websites, and its "ordinary" user base is shrinking, so angular2 might attract enterprise users. Laravel is arguably the most popular PHP framework today, choosing vuejs as its client framework gave vuejs a strong boost for sure.
- theprotocol 10y agoAgreed, Vue.js and Riot.js are both brilliant for actually getting things done without having to read a 100 page manual. As for Vue vs Riot, it's subjective, but I'm personally partial to Riot due to its simplicity (albeit with a smaller feature list) and focus on components without being opinionated at all (not even regarding the toolchain).
- skrowl 10y agoAngular is a more full featured than React by itself. To get React to equivalent features you have to add on (and learn) several other things (Redux, WebPack, etc, etc). As a bonus, there are lots of different conflicting flavors-of-the-week for things to use with React to build out your stack, so whichever you pick to go with React might not be cool next week.
- whatever_dude 10y agoThis. In the end both work similarly, but with React you have to shop around to decide what to use. With Angular things are a bit more strict and directed.
- hugozap 10y agoThis is not accurate. You don't need to learn Redux or WebPack to use React. With Angular you also need a build process so you can use gulp or WebPack. Maybe there's a pre baked process but you still need to know some build tool. Because React doesn't care about how you manage your state, you can use Redux or other solutions. Not because they are cool , but because it fits your needs.
- pauljaworski 10y ago> To get React to equivalent features That's the key part you ignored in your response.
- RussianCow 10y agoI think the overall point that you have to fill in the gaps yourself still stands, though. Angular just comes with way more features than React does, so if you want an equivalent experience, you have to use third-party libraries with React, which increases the amount of things you have to learn. Not that this is entirely a bad thing, but you can't really compare bare React to bare Angular and say they're equivalent.
- hugozap 10y agoNot sure if your point about the amount of things to learn is true. I prefer learning small utilities and compose them. The cognitive load is much more smaller (for me) than having to learn a giant monolith. I guess it's a matter of preference.
- taesu 10y agoI don't have time to learn both. TBH, I am forcing myself to learn cuz... all these examples I could accomplish with jquery...
- ebeal 10y agoYou could get the end result of a lot of these smaller example applications with jquery but making anything bigger is going to get very unmanageable very quickly. Also considering how close angular 2 is to react I'd be surprised if by learning one you wouldn't be able to at least understand code in the other. I guess it really depends what your end goal is.
- savanaly 10y agoAngular for job opportunities, react for more pleasant and forward looking web development practices.
- devuo 10y agoEr.. https://github.com/angular/angular-cli https://github.com/angular/angular-cli 1. Open terminal 2. > npm install -g angular-cli > ng new app > ng serve 4. Use the cli tool to generate components/pipes/services/etc., build, test, develop 5. Profit. Find a more blissful and joyful experience than this in react land?
- andys627 10y agoMaybe, but it will take you 3 weeks to set it up.
- specialp 10y agoThis: git clone https://github.com/Day8/re-frame-template lein new re-frame <project-name> lein figwheel Program with a great functional language (Clojure) and watch magic happen when Figwheel dynamically reloads all of your changes in your browser...
- slmyers 10y agoWell, react did come up with this https://facebook.github.io/react/blog/2016/07/22/create-apps-with-no-configuration.html https://facebook.github.io/react/blog/2016/07/22/create-apps... recently. Also, one thing that is not enjoyable/straightforward with(angular-cli) is having to utilize System.js in order to include 3rd party libraries in your app.
- Bahamut 10y agoThat is about to change to webpack on next release - a big PR landed in the angular cli to switch it to webpack from broccoli.
- savanaly 10y agoThe number of steps it takes to get it "up and running" is relevant, but hardly the most important part of what makes a language/framework a pleasant experience. Also, you seem to assume I'm in react land? But I'm an angular developer. I know first hand the big problems of angular :P
- woofyman 10y agoLearn both then decide for yourself which one you like better.
- aikah 10y agoWhat should you learn? both. But you should also be able to write "rich" single page applications without a framework and understand basic DOM manipulation.
- HillRat 10y agoMy experience is that Angular 2 is a great solution for enterprise-style shops who are looking for an all-in framework. With React, you benefit from greater flexibility outside the view layer, but ... well, you also suffer from greater flexibility outside the view layer. In general, I'd say that the more comfortable you are with current FEAD practices and toolchains, the more power you'll get out of a React-based architecture. The more you want something that "just works" and has already made many architectural decisions for you, give ng2 a shot.
- ken47 10y agoHaving used and studied both React and Angular2, Angular2 can do certain things that React can't. Two features at the forefront of this difference are: 1) Dependency injection 2) Direct support for using observables and promises in templates However, I cannot think of anything major in the reverse direction. There is also the fact that it is designed to be used with Typescript from the get-go, which can be a plus if type safety is your thing.
- Chyzwar 10y agoYou can inject stuff using props. DI is not unknown concept in react, note that angular1.x do not have true dependency injection. React decouple data and view. You can achieve similar behaviour but using flux/redux to publish/subscribe.
- erokar 10y agoWith Angular you get all you need out of the box. Easy to get going with ng-cli (creating an app, generating components etc.). Typescript is default, so you get type safety if you want it. I like a lot of what I see. Conceptually, React and Angular are quite close. In both you build an app with components nested in a three structure. Angular let's you do two-way binding if you want — convenient, but makes state changes less explicit. React is closer to bare bones JS and HTML. Templating in HTML only consists of a simple way to embed JS code and a few reserved keywords. In Angular, templating is much more elaborate, and therefore more complex and takes a longer time to learn. React — both by design and community — favours FP priciples, while Angular is mor OOP oriented, though neither is strictly one or the other. Personally I like both. React for its simplicity, Angular for its all-batteries-included approach and support for static typing as default.