DEV Community

Cover image for Introduction to React.js
Immaculate Njoroge
Immaculate Njoroge

Posted on

Introduction to React.js

This article covers a brief introduction to the React library as I dive more into it in the coming weeks.
This is part of my #100DaysofCode challenge

React is a JavaScript library which builds user interfaces. Mostly used and run by Facebook.

Features of React

JSX
This is JavaScript XML. It is JavaScript syntax extension which combines JavaScript and XML language.

Virtual Document Object Model (DOM)
React library generates an in-memory data structure cache which computes changes then updates the browser. Any corrections made, are compared it to its previous state and only updates objects in the real DOM instead of updating all of the objects.

Components
React is made up of several building blocks with their own distinct functions.

One-way Data Binding
The data flow is in one direction, done by Flux. The callback of components is done after they are edited. This is as the data in the components is immutable (cannot be changed).

Advantages of React?

  • It is straightforward making it easy to learn and use
  • It utilizes Native approach-reusable code supported throughout Android, IOS and Web applications

Disadvantages of React

  • It is a library and not a complete framework-makes it less useful as it depends on external libraries
  • It is relatively new and is constantly changing and updating which maybe a hassle to some.

Top comments (1)

Collapse
 
baraa_baba profile image
Baraa Baba

"It is a library and not a complete framework-makes it less useful as it depends on external libraries" I think that's a double edged sword since its good to have a lot of options but it might get confusing especially for beginners.