Reputation: 135
We are trying to make a pros and cons list for moving from Angular to Flux + React, and came with this raw list.
Can anyone react (see what I did here?) to the debates and prove otherwise? (please, specifically for each debate and not a general discussion about the libs).
Thanks!
--------------------------------------------------------------------
| Angular | React + Flux
--------------------------------------------------------------------
Version | 1.+ major version. | React 0.13 - not version 1 (
| Supported. | minor) - not finalized, can be
| 2.0 - migration | changed drastically.
| possible easily | Flux 2.1.
--------------------------------------------------------------------
Age | 6 years (easier find | react 2 years
| developers) |
--------------------------------------------------------------------
Framework | Yes, MVC | React is only view. Flux is a
| | pattern, not MVC.
--------------------------------------------------------------------
Community |More existing resources| Much less, than Angular.
|answers,ready 3rd party| Community smaller. Less.
|reusable code modules. | answers, etc.
---------------------------------------------------------------------
Speed |Rendering: slower | Rendering: faster
|Load time: slower | Load time: faster
|reusable code modules. |
---------------------------------------------------------------------
Testing |U tests. e2e everything| U tests.
|is ready to use. | Separated / new
|Has integrated system. | testing system.
---------------------------------------------------------------------
jQuery + |Lite is build-in inside| No jQuery support.Need to check
plugins |Maintain 1 library | compatibility issues with each
|Has integrated system. | version update
| |(need maintain 2 libraries).
---------------------------------------------------------------------
Upvotes: 2
Views: 1261
Reputation: 12382
The migration to Angular 2.0 is not so clear AFAIK.
Angular's first stable versions came out around 2013, I suppose this should be the age.
I wouldn't expect React to change much, because it's actually really simple (much simpler than Angular, I mean less concepts to learn).
I find the React community pretty active, and there are lots of ready-to-use components.
Testing React components can be tricky, because Jest (Fb recommended tool) is buggy. But once you get it right (e.g. using Mocha / plain Jasmine), you can have blazing fast tests in Node. On the other hand, I find Karma (recommended by Angular) slow and unstable, although the tests are initially easier to write.
I find React components even easier to reuse than Angular, because Angular forces you to use its DI engine, and you don't need this if you use browserify or webpack to bundle your code (and I highly recommend using one of them).
You can use jQuery stuff in React, but I would recommend avoiding this whenever possible, because if any of your plugins modifies the parts of the DOM controlled be React, your app will break miserably. In Angular, in such a situation typically only some things break while the rest of the app continues to work. (It's actually not obvious which behaviour is really better, I'm for React here).
BTW, you missed one very important point in your comparison: React can render stuff server-side, without a DOM. That's a killer feature for me.
One more private advice from me: If you're starting a new project, think about how long will you have to support it. If a year, take Angular. If two-three, take React. If more, read this and give yourself more time to think :)
Upvotes: 2
Reputation: 4945
I moved from angular to react and would not go back. As a long time full-stack developer the react framework allows for a much cleaner code environement. My impression is that react will appeal more to coders where as angular might appeal more to web crafters.
Version: React may be at 0.13 but it is used in production by facebook so is not likely to change much. One of the reasons I looked at react in the first place was Googles less than clear plans for using angular or supporting it for there own use.
Framework: React provides a much cleaner seperation of concerns than angular. React components need only vocus on the view. Flux stores can handle all the business logic. Trying to get the same clarity from angular is challenging to say the least.
Community: Much less mostly because much less is needed. React is just simpler to get up to speed with.
Speed: React is also faster to develop with and can have reusable components.
jQuery + plugins: I think of jQuery as a useful kludge to make things work before html5 offered a proper platform for web development.
Just one developers opinion.
Upvotes: 7