Fall in Love with ReactJs
3 min readFeb 18, 2021
What’s ReactJs?
ReactJs is an open-source JavaScript library for building fast UI (user interface) components. It is a component-based front-end library responsible only for the applications view layer. It was created by former Facebook developer Jordan Walke in May 2013. Since then it has become the most popular JavaScript framework surpassing Vue.js and jQuery.
Prerequisites
Before learning ReactJs developers must be familiar with programming concepts like function, objects, arrays, and classes. You must also have a basic knowledge of JavaScript and HTML
Who uses React?
React has been steadily increasing in its popularity and is being used in many well-renowned companies including:
- New York Times
- Netflix
Why use React?
- Fairly easy to learn
- Easier to create dynamic applications because it requires less code while providing more functionality
- It has faster performance speeds by using Virtual DOM which compares the previous states of components and updates only the items in the Real DOM that were changed
- Components are reusable
- It follows a unidirectional data flow to make debugging easier
Features
- Virtual DOM: React keeps a lightweight representation of the “real” DOM in the memory, and that is known as the “virtual” DOM (VDOM). Manipulating real DOM is much slower than manipulating VDOM because nothing gets drawn on the screen. When the state of an object changes, VDOM changes only that object in the real DOM instead of updating all of the objects
- JSX: JSX is a syntax extension to JavaScript. It is used with React to describe what the user interface should look like. By using JSX, we can write HTML structures in the same file that contains JavaScript code. This makes the code easier to understand and debug, as it avoids the usage of complex JavaScript DOM structures.
- One-Way Data Binding: React’s one-way data binding keeps everything modular and fast. A unidirectional data flow means that when a developer designs a React app, they often nest child components within parent components. This way, a developer knows where and when an error occurs, giving them better control of the whole web application.
- Component-Based Architecture: Components are the building blocks of any React application, and a single app usually consists of multiple components. A component is essentially a piece of the user interface. React splits the UI into independent, reusable parts that can be processed separately.
sources: