Let’s Learn React Js
What is React Js?
React.js is an open-source JavaScript library that is used for building
user interfaces specifically for single-page applications. It’s used for
handling the view layer for web and mobile apps. React also allows us
to create reusable UI components. React was first created by Jordan
Walke, a software engineer working for Facebook. React first deployed
on Facebook’s newsfeed in 2011 and on Instagram.com in 2012.
React allows developers to create large web applications that can
change data without reloading the page. The primary purpose of React
is to be fast, scalable, and straightforward. It works only on user
interfaces in the application. This corresponds to the view in the MVC
template. It can be used with a combination of other JavaScript libraries
or frameworks, such as Angular JS in MVC.
React JS is also called simply React or React.js.
1
What are the React.js Features?
Let us take a closer look at some essentials features of React.
React.js properties include the following:
● React.js is declarative
● React.js is simple
● React.js is component-based
● React.js supports server-side
● React.js is extensive
● React.js is fast
● React.js is easy to learn
2
JSX
In React, instead of using regular JavaScript for templating, it uses JSX.
JSX is a simple JavaScript that allows HTML quoting and uses these
HTML tag syntax to render subcomponents. HTML syntax is processed
into JavaScript calls of React Framework. We can also write in pure old
JavaScript.
React Native
React has native libraries that were announced by Facebook in 2015,
which provides the react architecture to native applications like IOS,
Android, and UPD.
React-native is a mobile apps building framework using only Javascript.
It uses the same design as React, letting you utilize/include a rich
mobile UI library/ declarative components. It uses the same
fundamental UI building blocks as regular iOS and Android apps. The
best part of using react-native is to allow/adopt components written in
Objective-C, Java, or Swift.
3
Single-Way data flow
In React, a set of immutable values are passed to the components
renderer as properties in its HTML tags. The component cannot directly
modify any properties but can give a call-back function with the help of
which we can do modifications. This complete process is known as
“properties flow down; actions flow up.”
4
Virtual Document Object Model
React creates an in-memory data structure cache that computes the
changes made and then updates the browser. This allows a unique
feature that enables the programmer to code as if the whole page is
rendered on each shift, whereas react library only renders components
that change.