Live data from Hacker News

Guide to JavaScript Frameworks

javascriptreport.com

41–50 of 244 posts

Re: Guide to JavaScript Frameworks

#41
post #37

Earlier quoted context omitted.

The one thing that Vue does great is exactly what you say you like about React (edit: not to say there aren't other things Vue does great, just that this is one of them). In Vue you have one file that contains the styles, code, and HTML for the component, all in their own HTML tags. That means that there is a "blessed" solution for styling, that I'm afraid React will never have. Between "styled components", CSS-Modul…

styled-components are actually really nice, so I don't think it's fair to say "styling is React's worst part". This seems like a more general criticism of React's agnosticism when it comes to so many things. React falls more heavily on the library spectrum than the framework one. It's rather un-opinionated about a lot of things: styling, state management, routing, code organization, etc. Definitely not something that…

I completely agree, but at the same time styling still sucks in React when it comes to using 3rd party components. Not to mention that with each way of doing it there are big tradeoffs (styled-components pushes a bunch of what I feel could be compiled before release to the client at runtime).

Most of the other parts of React are great with the freedom of choice. I can use a 3rd party component that handles it's state internally, or expects to be controlled externally, or uses or doesn't use JSX, or organizes it's code however it wants. But if I want to style it (which i'll need to do), I need them to support the method I'm using in my app, or have this very ugly and hard to support "bridge" between what I'm using and what they are using.

I'm not trying to be all doom-and-gloom, but it is a pain point for me, and it's not getting better in my experience, it's getting worse. It's not nearly bad enough to get me to switch away from React, but it's something I would like a nicer solution to.

Re: Guide to JavaScript Frameworks

#42
post #7

Reasons why Vue will rock your socks off - Don't need to know jsx! - Sane way of scripting puts the script in an object and each component is html javascript css - Event buses allow sharing of variables between child components without either redux or pushing variables down one child at a time (finally!) - v-for looping is saner than reacts mapping - v-if allows v-if statements without renderIf component or multiple…

The points you've listed are the very reasons why i would prefer React actually ...

- JSX fixed all the templating issues from 10 years ago, i see no reason to go back to dependency injection, scope loss, arbitrary code-in-html expression and a semi-javascript accent

- Presentational view logic belongs to the controller while business logic is elegantly abstracted in React: view=fn(state). There's no point in ripping view creation from the presentational layer.

- Context and higher order components. Can't have those in an imperative architecture.

- v-for is not sane to me. Also odd, being forced to mix-in extensions for the simplest basics that go beyond the few presets Vue provieds: https://github.com/Krizzu/vue-for-range A React user doesn't solve problems by searching the internet for framework specific solutions, they import _ from 'lodash' and use _.range, like everyone else does.

- {condition && hello javascript}

- We have suffered through two-way data bindings with Angular already

- Vuex is not native. It mutates state by aggressively transforming state into setter/getters, with nasty edge-cases. Once Vue switches to version 3 using proxies, you'll maintain two incompatible codebases. React has Mobx, even though Redux is great. Also lots of lean and promising alternatives like Unistore.

- Knowing React you don't rely on documentation (though official docs are on point). It is simple enough to grasp it after looking at a view examples once. The api surface and cognitive overhead of React is a tiny fraction of Vues. Coming from Angular it is amazing that one month of learning and half a year of consulting docs turned into a week and a couple of months consulting with Vue. Yet, you can learn React fully in the shortest amount of time while simply remembering the few things you'd need to know. A generic round-trip, for instance the one at egghead, costs you 60 minutes total.

- http://www.npmtrends.com/angular-vs-react-vs-vue-vs-@angular...

Re: Guide to JavaScript Frameworks

#43
post #37

Earlier quoted context omitted.

styled-components are actually really nice, so I don't think it's fair to say "styling is React's worst part". This seems like a more general criticism of React's agnosticism when it comes to so many things. React falls more heavily on the library spectrum than the framework one. It's rather un-opinionated about a lot of things: styling, state management, routing, code organization, etc. Definitely not something that…

I completely agree, but at the same time styling still sucks in React when it comes to using 3rd party components. Not to mention that with each way of doing it there are big tradeoffs (styled-components pushes a bunch of what I feel could be compiled before release to the client at runtime). Most of the other parts of React are great with the freedom of choice. I can use a 3rd party component that handles it's state…

Good point, I wasn't really thinking about styling 3rd party components. styled-components makes it sort of okay, but still feel hacky.

Re: Guide to JavaScript Frameworks

#44
I come from a pure HTML + CSS + JS (mostly via jQuery) background. My career has headed in a direction that focusses a lot less in the frontend web, but every 2 months or so I read one of these guides and I get giddy - "Finally, I will teach myself angular/vue/react/backbone/knockout". After about 10 minutes I am filled with dread. I expect to learn about a specific piece of software, instead, I am greeted with requirements of previous knowledge on a whole bouquet of other technologies: node, webpack, babel, grunt...

It's just discouraging. This whole thing feels like a farce. I watch colleagues investing time in this and I feel sorry for them.

Re: Guide to JavaScript Frameworks

#46
Wow, Dojo is still alive and kicking! I'm going to have to find some time to take it for a spin. I really like the idea of framework that looks to address a few needs, making framework selection easier and less reliant on "Oh Framework X is popular now? Let's use that and hire a bunch of devs for it..."

While Dojo is there, I'm surprised ExtJS is not. I haven't worked with it directly for quite a few years but I know it is still being supported. I seem to recall some backlash around licensing issues so maybe that's caused a dip in market/mindshare?

I liked Elm when I played with it, especially the similarities with Haskell. Unfortunately they had moved away from some of the Haskell like syntax shortly after I started with it, and I didn't feel like I fully understood how to use JSON properly.

Kind of surprised to not see Meteor on there. Haven't used it for awhile, and iirc there were concerns around security, deployment, MongoDB lock in (which I thought they were moving away from?) at the time. For smaller, personal use projects I felt I got moving quicker and easier with Meteor than anything else.

I'd love to see something like this for libraries and tooling. Really feels like a lot of worthy choices, and therefore a lot of high-level knowledge needed to understand which to choose and when.

Re: Guide to JavaScript Frameworks

#47
post #7

Reasons why Vue will rock your socks off - Don't need to know jsx! - Sane way of scripting puts the script in an object and each component is html javascript css - Event buses allow sharing of variables between child components without either redux or pushing variables down one child at a time (finally!) - v-for looping is saner than reacts mapping - v-if allows v-if statements without renderIf component or multiple…

The points you've listed are the very reasons why i would prefer React actually ... - JSX fixed all the templating issues from 10 years ago, i see no reason to go back to dependency injection, scope loss, arbitrary code-in-html expression and a semi-javascript accent - Presentational view logic belongs to the controller while business logic is elegantly abstracted in React: view=fn(state). There's no point in ripping…

[deleted]

Re: Guide to JavaScript Frameworks

#48
post #7

Reasons why Vue will rock your socks off - Don't need to know jsx! - Sane way of scripting puts the script in an object and each component is html javascript css - Event buses allow sharing of variables between child components without either redux or pushing variables down one child at a time (finally!) - v-for looping is saner than reacts mapping - v-if allows v-if statements without renderIf component or multiple…

> - Sane way of scripting puts the script in an object and each component is html javascript css

Each component I have in React is script + css. It did require some setup though.

> - Don't need to know jsx!

Except you need to learn the v- bindings. I prefer JSX and JS here.

> - two way data binding with vue-model

Two way data binding is a problem, not a feature.

Re: Guide to JavaScript Frameworks

#49
post #44

I come from a pure HTML + CSS + JS (mostly via jQuery) background. My career has headed in a direction that focusses a lot less in the frontend web, but every 2 months or so I read one of these guides and I get giddy - "Finally, I will teach myself angular/vue/react/backbone/knockout". After about 10 minutes I am filled with dread. I expect to learn about a specific piece of software, instead, I am greeted with requi…

I'd recommend trying out create-react-app if you want to learn React without having to worry about all the build tooling craziness. Eventually you'll have to start fighting with those if you build some real life stuff, but create-react-app is great for just getting up and running so you can learn the actual library (the fun stuff) first.

Re: Guide to JavaScript Frameworks

#50
The rumours of Ember's demise are greatly exaggerated.

I have yet to hear of people making the same amount in any other framework. Seniors are making $200k to $500k in remote positions (the people I know live in Toronto, but they could be anywhere).

It is hard to learn, and I'm far from an expert, but the highest I've heard another JS developer who knew both Angular and React completely and he was responsible for migrating a company from one to the other and he was just starting to get into that range.

Large SPA JS applications are easier to structure in Ember because there are so many best practices. The problem with Ember is the learning curve because it doesn't usually let you take shortcuts.

Post reply on HN