4 ms·
I'm currently trying to train a new developer and slowly introduce him to the world of React/Redux and only now am I realizing how incredibly complicated it is.
by watty 11y ago
I'm currently trying to train a new developer and slowly introduce him to the world of React/Redux and only now am I realizing how incredibly complicated it is.
I enjoyed learning them and am efficient using them but now I'm not so certain that it's the best choice for a team with developers of different skill level and experience. Once you throw in React-Router even my days in Angular 1.x seemed simpler.
- bphogan 11y agoThis is so common among developers. We forget how the complexity happened bit by bit. But when we explain it to a newbie, it all comes back. Want to re-evaluate your whole base of knowledge? Teach programming to adults who have never written a line of code before. Wow, the things I thought I really understood. :D
- Ronsenshi 11y agoI concur. Friend has been learning React and from time to time asks about various things. Those questions made me realize that for the newcomers, especially people who are not well versed in JS, React could be incredibly challenging to learn. That said, I imagine cycle.js would be even more complex to learn - with this recent race to "FPR all the things!".
- blablabla123 11y agoSame experience I made. On the other hand I always think that making equally complex web apps with other popular frameworks is more difficult. At least if high performance and sustainable maintainability should be there. Therefore for me the most important metrics for a web framework are popularity and ability to deal with complexity. Hoping though that I get enlightened by another framework one day...
- Ronsenshi 11y agoI quite like what Angular 2 does with some of the ideas - Dependency Injection, number of solid modules such as Http and use of RxJS where it actually makes sense without forcing functional approach everywhere in general. However I wish they'd just go with JSX-kind of DOM generation instead of that horrendous combination of ng-ness and HTML.
- chrisco255 11y agoWell, that's sort of the difference between composing libraries to build applications and using a framework like Angular. Angular abstracts away a lot of things. This is good and bad. It's easier to get into Angular and get started sooner. But ask an Angular dev to explain the digest cycle to you, or transclusion or when and why to do one-way or two-way binding, and the relative merits of calling $parent or using controllerAs syntax. It's a really confusing mess. And folks use it without understanding how it works. With react, I can explain, quite simply, that it's simply a function: (state, props) => HTML . That is elegant as fuck. There no dirty checking, no two way binding or unintended side effects by cross-referenced observables. React-Router is only necessary if you want to build a SPA. Then you learn how it works, or you use some other router (like Redux-Router). It's great. You actually understand how your code works. It's a steeper learning curve up front, but you learn and you become a better developer as a result.
- EvanPlaice 11y agoI could explain how Angular2 works in great detail. It mimics the hell out of OOP. The component tree is a directed acyclic graph of single-inheritance relationships. Services are singletons that can be injected into any component to share state. Dirty checking follows the tree (ie the DAG) of inputs/outputs specified in the component metadata so there's at most O(log n) comparisons per update. To make dirty checking efficient favor immutability because it's quicker to superficially compare references than it is to deep check an entire data structure. Anything that's inherently asynchronous is handled via Rxjs observables using either a one-to-one or one-to-many publisher/subscriber model. As for Angularjs. Who the hell knows? Dirty checking, crawls the graph of relationships until the dirty checker gets tired. Services are kind of like singletons, I think. Factories try to mimic the borg/prototype pattern (because, reasons...) to provide singletons that share a reference to a common closure. Who the hell knows what providers do, maybe provide an instance that acts like a static helper class? Directives are magic, really complicated and painful to use magic that preprocess the HTML, who the hell knows when.
- madeofpalk 11y agoThis is very interesting for me. I introduced React (and companions, like redux, react-router, CSS Modules, etc) to a team of 8 who had never used any of this before and they all loved it and picked it surprisingly easily.