3 ms·
A lot of people say, learning React makes you a better developer. I think, what they actually mean, is functional programming.
by cygned 10y ago
A lot of people say, learning React makes you a better developer. I think, what they actually mean, is functional programming.
- e12e 10y agoHaving glanced at react, angular(2), riot.js and vue - and being somewhat familiar with procedural, message passing, class/inheritance OO, functional and logic/declarative (SQL/Prolog) paradigms - I can't help but think that many of the developers that praise react do so because react introduced them to (a rather convoluted form of) functional programming, leveraging templates (the php paradigm) as a form of gateway (in the teaching/approachability sense) approach? Because so far I just can't see react as the best/simplest approach to dragging REST[1] apps into the world of GUI COD(Code on Demand)[1] apps. Vue seems to strike a much more elegant balance, for example. Especially in terms of life-cycle - I can't say I'd look forward to maintaining most complicated js stacks for say five years - with a horde of (rapidly evolving) dependecies, and often a plethora of build tools/steps that in general all do some rather simple, but incompatible source-to-source translation (templates to html, some js dialect to another, scss to css). Vue certainly doesn't fix all of that - but it seems a bit more consistent and simple IMNHO. But maybe it's just me. It'd be interesting to hear if anyone's actually made the jump from "react in anger" to "vue in anger" - or vice-versa? [1] http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm
- cygned 10y agoReact is simple while it's extremely complex at the same time; the library's concept is actually not that complicated and the API is relatively small. A lot of developers struggle when it comes to architecting, though. I know many "enterprise developers" that favor Angular (and Angular 2) because of the "out-of-the-box" character and the magic that happens under the hood. Even with years of front-end experience I see these engineers fail at creating a reliable, documented and structured architecture. I guess, that's because they don't have time, budget or are no longer used to fiddle around and explore third-party projects (which is actually sad). That is, getting started with Angular (or Vue, I expect) is easier and you will get something together faster. I expect the reason why React is so popular to be the mix you describe - although "templating" is a bit off, because JSX isn't templating in the PHP or JSF way. From my personal point of view I can say, that I never regret the decision to switch to React (from Angular/Backbone.js). Especially the simple structuring (basically a component tree) is incredible simple compared to what you had in Angular 1. I am leading two projects with six digit LOC in the front-end and it is a pleasure to see how quickly new member can contribute, how clear the architecture is. Because there's no magic at all. But that's all very personal, opinions differ greatly and I even know one developer who loves Angular 2. But he also has to work with Hibernate in the backend and compared to that everything is great - just kidding ;) --- Edit: I have read Fielding's paper for my B. Sc. thesis a couple of times and it's a great piece work. Should be a mandatory lecture for a lot of fields.
- simiano 10y agoI had the same impression about Vue. When Redux came out I tried to learn React/Redux and, although I got it, it felt verbose and I couldn't quite pass the noob phase. Maybe I din't try hard enough. With Vue, on the other hand, it was easier to get started. I got a prototype working in a week with no previous knowledge of the framework. I'm avoiding the component state and using a Redux like approach using props and a centralised state, and I didn't even need to use Vuex[1]. I'm using typescript, which helps catch a lot of bugs early on, it's a little difficult to integrate with single file components[2] (which are awesome, btw), but once I got it working, it proved to be an excellent combo. The documentation is cristal clear and very beginner friendly. If you're getting started I highly recommend using vue-cli[3] to bootstrap your project I think Vue sits between React and Angular, being simpler than Angular, offering more features than React, and easier than both to get started. [1] https://github.com/vuejs/vuex https://github.com/vuejs/vuex [2] https://vuejs.org/v2/guide/single-file-components.html https://vuejs.org/v2/guide/single-file-components.html [3] https://github.com/vuejs/vue-cli https://github.com/vuejs/vue-cli