4 ms·
I see the points why React may be a good choice. Having only worked with Angular so far I really like it's dependency injection and the possibility to make use
by Vespasian 11y ago
I see the points why React may be a good choice. Having only worked with Angular so far I really like it's dependency injection and the possibility to make use of services and directives.
However from what I understand React does not implement these features so what additional libraries could be used to keep these mechanisms?
Edit: I'm working in Research so my projects typically have a limited scope and user base.
- lingojs 11y agoDirectives are replaced by React components. I would argue, IMO, that directives are actually a half-assed implementation of components. In terms of services, I would recommend using Flux to perform actions / store your state. This is what a lot of developers are leaning towards these days. There was a great talk at React Conf about Reflux, I've never used it, but the presentation has convinced me to try it out on my next project: https://www.youtube.com/watch?v=xsSnOQynTHs https://www.youtube.com/watch?v=xsSnOQynTHs When you build with React, imagine building an application in Angular using only Directives. It isn't that simple, but that is sort of the idea with React components. I started with Angular (and still work day to day with it at work) but if someone asked me how I would architect an application tomorrow, I would go with Flux + React + ES6, no questions asked. Also, Angular2 is heavily influenced by React, so learning React now will allow you to have a better understanding of Angular2.
- tilt 11y agoJust to point out that Dan Abramov's talk is about Redux, his implementation of Flux (not Reflux) https://github.com/gaearon/redux https://github.com/gaearon/redux
- deleted 11y ago[deleted]
- Vespasian 11y agoAwesome. Thanks for the help and the pointers :) The great thing with research-prototypes and their short term lifecycles is that you can explore a lot of different options and strategies (sometimes parallel in different projects). The disadvantage is that you need to make sure that the prototype stays a prototype and is not "expanded" into something different. (That will fail for obvious reasons)