React – an introduction

1. Introduction

React is a JavaScript library for building user interfaces.

React is free and open-source. It is maintained by Meta (formerly Facebook) and a community of individual developers and companies. React can be used to develop single-page, mobile or server-rendered applications. React is not a framework and does not provide all the capabilities. React is mainly concerned with state management and rendering that state to the DOM. That is why, creating a React application requires use of additional libraries (like for routing).

2. Why React?

Yes, it is another JavaScript library. The other popular libraries are jQuery, Angular, Dojo, Meteor etc. So the question is – Why React? You can find a number of articles explaining the reason to choose React for your project. Following are some important points which can be provided in support of React:

  • React is simple. When you start with React, it may not look simple at first. But when you get the idea of React and spend some time with it, you’ll feel that it makes building user interfaces very easy.
  • React is component based. You can break your application is smaller reusable components and can integrate these components to build your application.
  • React is fast and provides high performance. React uses the concept of virtual DOM. It is a tree based on JavaScript components created with React that mimics a DOM tree. Virtual DOM is kept in memory and is synced with real DOM. This helps in performance improvement as “real” DOM manipulations are slow. And the best thing is, you don’t have to take care of this of your own.
  • React is extensible. React can be extended and you can develop your own component library. React does not have everything of its own and other JavaScript libraries can be used with React to provide specific capabilities.
  • React supports mobile app development. With React Native, you can do hybrid app development. React allows you to develop apps for iOS and Android.
  • Vast community and resources. React is widely used and there are number of communities and resources available to help you get started and build your UI application.

3. History

React was created by Jordan Walke, a software engineer at Facebook. React was first used in Facebook’s News Feed in 2011 and later on Instagram in 2012.

At JSConf 2013, React was made open source.

React Native, which enables native Android, iOS, and UWP development with React, was announced at Facebook’s React Conf in February 2015 and open-sourced in March 2015. React Fiber was announced by Facebook on April 18, 2017. Fiber was a rewrite of React’s rendering algorithm.

It was a full rewrite of React’s internals that changed barely anything about the public API. On February 16, 2019, React 16.8 was released to the public which introduced React Hooks.

4. Conclusion

In this tutorial, we discussed briefly about the React.js. This is not an extensive article but just an introduction. We’ll discuss every aspect of React in detail. In the next tutorial, we’ll see how to create our first React app.