Hacker News new | ask | show | jobs
by nicoburns 2229 days ago
React, Angular, and Vue are the big 3 web frameworks. Of which React is still more popular than the others I believe, and it takes a slightly different approach. While Angular and Vue use string-templating DSLs to control rendering, React uses JSX which is a thin syntax sugar over JavaScript (and allows you to mix JavaScript in with it). React is also more functional. In practice I find this makes it more flexible, and easier to debug. Angular and Vue are very similar, but Vue has the reputation of being simpler while Angular is the Enterprise Java of the web view.

There are a bunch of others that are less popular such as Ember, Svelte, and Inferno which are also decent in their own right, but the ecosystem of libraries around them is smaller.

The most important libraries to know about in the React ecosystem are React-Router for routing, and either Redux or MobX for state management. There are other options, and for small apps you could get away without a state management library, but these are the mainstream options. I'm not super-up on the Angular/Vue ecosystems, but I believe they're more integrated (e.g. they provide more first-party libraries).

Almost everyone who is using these frameworks is also using either Babel or TypeScript together with Webpack for bundling. There are other options for bundling such as Parcel and Rollup, and again it is possible to get away without bundling or transpiling if you really want to, but Webpack is still the mainstream option for applications (Rollup is well-suited to libraries).

React-native is a different beast. It's a cross-platform mobile (and now desktop) framework rather than a web-based one. It uses React executed in a JavaScript VM to control rendering, but it renders native mobile UI toolkits. There are similar projects for Vue and Angular, but unlike the web versions which are competitive with React, they are nowhere near as mature. React-native's real competition for cross-platform mobile development is Flutter. Flutter is written using that Dart language, and takes a different to React-Native. Rather than compiling down to native UI widgets, it custom-renders everything. This makes it more reliable and consistent across platforms, but also more limited in what you can because you can't hook into the existing ecosystem of native ios/android libraries nearly so easily.

My subjective view on this is that React-Native is just about on the cusp of reaching maturity, while Flutter doesn't quite seem to have enough momentum to reach the mainstream. Although I'd love to be proven wrong on that one.

1 comments

I don't think it's too common, but Vue does support JSX: https://vuejs.org/v2/guide/render-function.html