Return to site

React in web development

React.js is great for building large apps with data changing over time

· react,Development

React is a flexible and efficient JavaScript library for creating user interfaces. Developed by Facebook, loved by millions.

Advantages of using React

React is not yet another MVC framework. It is a library for building composable user interfaces. As opposed to rather restrictive templates or HTML directives, it encourages creating reusable UI components written in full-featured JavaScript. This approach makes it easier to keep state out of the DOM and ensures better app testability and fewer bugs due to logic encapsulation.

In traditional JavaScript apps, you need to keep track of what data changed and imperatively sync these changes to the DOM in order to keep it up-to-date. Some frameworks try to bridge this gap with e.g. two-way data binding or directives. React not only does the job for you, but also makes sure it's super efficient, by updating only the parts of the DOM that actually changed (virtual DOM).

React is mostly used on the client-side, but if e.g. SEO is your big concern, you can actually run React on the server. And, as if this was not enough, with little extra effort you can leverage React Native to build native iOS, Android and Windows Phone apps! Also, a viable alternative for developing mobile apps is Apache Cordova and plain React (basically a web-app running inside a WebView).

Our experience with React

There are very few libraries that can really match or challenge React when it comes to ease of composing complex UIs and performance. The learning curve for developers is also pretty tolerable (I'm looking at you, AngularJS).

At rspective, we find React a perfect fit especially for complex UIs - that's where blazing performance really kicks in, and composable architecture pays off in overall simplicity and a solution that is easy to maintain. On the other hand it fits well into small apps too - as they tend to grow with new features over time, so it often makes sense to put React in place at the very beginning, rather than back off from e.g. jQuery or rewrite the whole thing later on.

Another advantage that we see in practise is that it's only a View library. In effect, it doesn't impose how you are supposed to design your entire application, but it gives you freedom to pick your tools of choice and use them together with React as you want. In other words - it doesn't force you to build the app within the constraints of the framework (taking it to the extreme - you don't need to work around your framework), but the framework is there to help you out with the tech so you can truly focus on the business.

Together with libraries that help you handle state through-out your application, like redux or MobX, React positions itself as a state-of-the-art and truly powerful tool. With a great developer community and cross-platform capabilities, it becomes a de-facto standard of the modern web.

Also, check out our other post on React Native!

All Posts
×

Almost done…

We just sent you an email. Please click the link in the email to confirm your subscription!

OKSubscriptions powered by Strikingly