23 ms·
Just out of curiosity what exactly can you do with React that you can't with Angular 2?
by qaq 11y ago
Just out of curiosity what exactly can you do with React that you can't with Angular 2?
- andrewflnr 11y agoReact lets you summarize your framework in a single sentence: make your UI a pure function of your model, but keep performance. OTOH, I still don't understand what the deal with Angular is.
- qaq 11y agoThat's sounds great but it does not really play out in a real world if you need to animate transitions to make UI look nice for example.
- apsurd 11y agoI disagree. CSS animations work very well and offer better performance. You can maintain the animation lifecycle by the React lifecycle callbacks and use of setTimeout
- qaq 11y agoCSS animations do not work when you need to morph distinct components in complex coordinated manner. They are significantly slower then velocity js. Doing things available with quality solutions such as Ember liquid-fire are simply not possible.
- madeofpalk 11y agoAnimations work really well with React! The Animated library (originally from React Native) gives you some pretty basic but powerful primitives to build whatever animation you need.
- qaq 11y agoOn route transition you want to animate morphing unrelated components between before transition components and after transition components. You will not be able to do this in functional manner. You will not be able to do this with CSS animations. Example of how this is done with Ember liquid fire. https://www.youtube.com/watch?v=vq_BcIFM8Rc https://www.youtube.com/watch?v=vq_BcIFM8Rc
- narrator 11y agoAngular is an ORM for the DOM. With an ORM it's: "here's my model, figure out what to do to the database". With Angular it's "here's my model, figure out what to do to the DOM". Some people hate ORMs because there's too much magic, other's like them because they let one think about other parts of the app more.
- mateuszf 11y agoReact with redux allows to write most of the code in a purely functional / no side effects manner, which makes testing code almost a joy.
- qaq 11y agoYou can use Redux with almost anything including Angular 2. The purely functional manner is only an option if you Ok with providing subpar user experience (need to provide quality cross component animated transition that no side effects functional thing goes out of the window really fast). Given modern tooling the testing point is also a bit overstated.
- mateuszf 11y agoWhat exactly do you mean? What is better then having a reliable, easy to write unit tests which cover most of the logic and run very fast?
- crucialfelix 11y agoI've used flux and redux in angular for years. You can write purely functional directives. Angular is much more than just a view library. I've built quite a bit in both react and angular.
- jbergens 11y agoThat's nice but then you don't have the "angular is the standard and I don't have to choose anything" advantage anymore.
- crucialfelix 11y agoBut my code is more flexible, less dependent on the framework it's deployed in. So I can more easily survive things like "migrate to ng2"