Angular or React: Performance

Stas Demchuk

by Stas Demchuk on 09/15/2015


Not much to say here, except that React is a winner in this criteria. Virtual DOM itself makes a huge impact on performance, but if that's not enough for you, there are methods that help you optimize your app even further, like shouldComponentUpdate and PureRenderMixin.

As said earlier, Angular's two way data binding becomes a problem when you have many bindings on the page. Yeah, they've introduced one-way binding in latest versions, but you won't be able to use it everywhere and you'll have to spend some time refactoring your existing code.

Dirty checking is inefficient when you have big sets of data rendered and when something changes. Angular simply rewrites the DOM which hurts performance even more. React computes the best way to modify the real DOM by comparing data in virtual one.

We should not forget that we can use React with Angular and get the benefits from both frameworks, but in order to make it look good and work well, you have to develop your application in a certain way. You have to create your app as a set of components (use directives and custom elements), which can result in breaking of habits for someone who has become used to working with Angular. But don't worry, in the long-term, this approach will bring you the benefit of migrating to Angular 2 with less pain.

What was your experience with performance of angular and react? Let us know in the comments below!

Previous article in this series: Angular or React: Ecosystem
Next article in this series: Angular or React: Maintenance