ReactJS


React (sometimes styled React.js or ReactJS) is an open-source JavaScript library providing a view for data rendered as HTML. React views are typically rendered using components that contain additional components specified as custom HTML tags. React promises programmers a model in which subcomponents cannot directly affect enclosing components ("data flows down"); efficient updating of the HTML document when data changes; and a clean separation between components on a modern single-page application.

It is maintained by Facebook, Instagram and a community of individual developers and corporations. It's used for handling view layer for web and mobile apps. ReactJS allows us to create reusable UI components. It is currently one of the most popular JavaScript libraries and it has strong foundation and large community behind it.

React Features

  • JSX − JSX is JavaScript syntax extension. It isn't necessary to use JSX in React development, but it is recommended.

  • Components − React is all about components. You need to think of everything as a component. This will help you to maintain the code when working on larger scale projects.

  • Unidirectional data flow and Flux − React implements one way data flow which makes it easy to reason about your app. Flux is a pattern that helps keeping your data unidirectional.

  • React Native − React Native libraries announced by Facebook in 2015 provide the React architecture to native iOS and Android applications.

  • Virtual DOM − Another notable feature is the use of a "virtual DOM." React creates an in-memory data structure cache, computes the resulting differences, and then updates the browser's displayed DOM efficiently. This allows the programmer to write code as if the entire page is rendered on each change while the React libraries only render subcomponents that actually change.

React Advantages

  • React uses virtual DOM which is JavaScript object. This will improve apps performance since JavaScript virtual DOM is faster than the regular DOM.

  • React can be used on client and server side.

  • Component and Data patterns improve readability which helps to maintain larger apps.

  • React can be used with other frameworks.

React Limitations

  • React only covers view layer of the app so you still need to choose other technologies to get a complete tooling set for development.

  • React is using inline templating and JSX. This can seem awkward to some developers.