about React

Mizuki Nagashima
5 min readDec 6, 2021

Among the many JavaScript frameworks and libraries available today, React is the one that boasts the highest adoption rate in web services worldwide.
React has low coding costs and is easy to manage even when the scale of development is extensive.

https://reactjs.org/

A JavaScript library specialized in UI creation.

React is a JavaScript library developed by Facebook for building UI parts for websites. It is also sometimes called React.js or React.JS. React is often compared to AngularJS and jQuery, but React itself is not a framework. It is just a library for building UI. Currently, it is the most promising library, being adopted by not only "Facebook" and "Instagram" but also "Airbnb," "Netflix," "Slack," "Uber," and many others around the world. It is also open-source, so it is constantly being improved, and quality is maintained.

This is the core idea of React

① Declarative

One of the features of React is that it can be implemented in such a way that it declares to UI components, "This is how it will appear (or look)." This has made it possible to create source code that is simple and easy to understand for everyone to see. As a result, it is easier to identify problems and debug and test.

②Component-Based

React makes it easy to customize by separating components by parts. With Angular and jQuery, even if you want to change a piece, you need to change the whole thing. With React, you can change only the part you want to change, making it easier to modify, manage, and reuse. Also, large JavaScript code can be made more maintainable by making it into parts, and development person-hours can be reduced by reusing existing React components.

③Learn Once, Write Anywhere

React is designed to be used in the middle of the development process. Therefore, development can be done without rewriting the existing source code, even when adding new functions. Also, once you master React, you can adapt it to web applications and other fields. For example, mobile app development can use React Native, a cross-platform based on React. A simple mobile app can be created without using Swift (iOS) or Java (Android), using only javascript and React concepts. One of the key features is the ease with which it can be implemented immediately in any web application.

Advantages of using React

: Excellent and crisp performance (fast virtual DOM)

In React, virtual DOM (Document Of Model) is used. This is an efficient mechanism that when you want to update a part of a web page, instead of updating the whole page, only the updated position is changed. Thanks to this mechanism, only a part of the page needs to be rendered, and the display can be switched at high speed.

: The larger the application, the better.

The most crucial aspect of running an extensive scale application is management. As the number of pages increases, the amount of time to create and test the content will increase unless the content is as similar as possible. In addition, it needs to be flexible enough to withstand the increasing number of complex processes such as page transitions and conditions between contents. React has the potential to solve these issues. And the following features make it suitable for large-scale applications.

① It is designed to be easy to manage.

jQuery, Backbone.js, and Angular.js can be challenging to work when they become large-scale.

② Complex conditions can also be incorporated

JavaScript itself is a relatively flexible language in that functions are objects, callback functions can be used, and functions can have any number of arguments.

③ Designed to avoid code complexity and be easy to read

In React, data flows only in the direction of "data" to "screen" (unidirectional binding). This avoids complexity in the code and makes the design easier to read.

④Highly customizable

This means that you can make the most of the tools, build tools, and folder structure you choose. For example, you can use Facebook's Jest framework for testing and change the folder freely for each project.

: As soon as you can write javascript, you can easily use it

Since the foundation is written in JavaScript, if you have experience in javascript development, you can create an application with little learning cost.

: Efficient creation of the DOM, even in a JavaScript-based environment

React has its syntax called JSX, which was developed to output the DOM in an XML-like format. Creating a DOM using JavaScript or React's standard API is possible, but it will inevitably be redundant. So by using JSX, you can embed it within React as if you were writing HTML. Also, syntax errors such as misspelled tags are checked at compile time to ensure safety.

: Easy to create SPA (Single Page Application)

SPA's beauty is that you don't have to load the entire page every time, making it efficient and fast. However, on the other hand, when developing, you have to use a lot of JavaScript. React is a very compatible library because it can fully reproduce the fast operating speed required for SPA by taking advantage of React's three features.

: Easily create a front-end with modern UI.

React is used worldwide, so you can use the React library to compose your UI. There are many UI parts such as Button and Form that can be handled as React components in advance. With these, you will create a sophisticated screen with a modern look.

--

--