3 ms·
Question from a JS layman: React is great in comparison to what? vanilla JS? Angular/Backbone/Ember? JQuery? any other *.JS? Also is this a good direction for
by fizixer 12y ago
Question from a JS layman: React is great in comparison to what? vanilla JS? Angular/Backbone/Ember? JQuery? any other *.JS?
Also is this a good direction for "mobile first" approach? What about platform independence? (iOS/Android/Desktop agnostic, etc, etc). (bootstrap? phonegap?)
- myhf 12y agoIn comparison to Angular, React is more idiomatic. It is very easy to reason about the scope, lifecycle, and performance of React components if you are familiar with JavaScript as a language. In comparison with Backbone/JQuery, React is more declarative. It encourages the developer to describe the structure of the UI in a given state and let the engine handle the transitions between states. It's possible to use Backbone models and events with React views with very little impedance mismatch. I would like to hear an Ember expert's perspective. React Native has an interesting approach to mobile-first development. The general philosophy is "learn once, write anywhere" instead of "write once, run anywhere". Most apps cannot make the most of their platform while being truly platform-independent, but unifying component lifecycle behavior between platforms could end up being easier on developers than learning the particulars of each platform, while producing a better result than a PhoneGap-style wrapper.
- go1979 12y agoI'm not an expert ... I dabbled a bit in Angular and found it really confusing and hard to debug. React worked mostly as expected. There were some gotchas but I managed to get through them in a few days. I just wish we had a non-proliferation treaty on Flux frameworks.
- TheAceOfHearts 12y agoFlux is an idea, there's multiple implementations because they optimize for different concerns. For example, I like Fluxible because it lets you do server side rendering, and it avoids singletons, so it's exceptionally easy to test. However, if I'm working on an app that doesn't have any public facing components, I'd probably consider a different implementation that is less verbose.
- jbergens 12y agoThe proliferation of Flux frameworks will probably continue for a while. Then, hopefully, things will settle down and we will only have a few frameworks left that have clear differences which makes it easy to choose between them. I currently like Reflux and would choose that as a start if I created a new project. https://github.com/spoike/refluxjs https://github.com/spoike/refluxjs [Edit added link to Reflux]
- nwienert 12y agoFor me React is great in comparison to anything I've tried before, which was really hand-rolled, jQuery, and Backbone. I tried to get into Ember/Angular in the past, but the learning curve was way too high. I didn't have time to spend a month going slow. With React, I was up and running within a day. Of course, it took way longer to put together a good stack. I spent months pushing React and trying to learn the best practices there. I did end up with something relevant though. I built Reapp: http://reapp.io http://reapp.io It's really a bunch of things in one, but I think it's hugely overlooked for being an awesome bootstrapping method for getting a full-featured React app up and running. You can have your app running with hot reloads, ES6, cordova-builds, flux, etc all in minutes with a single command. And of course it includes an awesome (IMO) UI kit to boot.