Introduction to React.js

azhar bin Shakil
2 min readMay 7, 2021
React.js

React is not a framework, it’s a Library

React is not a framework, it’s a Library. That’s why we can easily take the components we need and make an app according to our choice.

Babel

Babel is a transpiler that converts our ES6/next-generation code to ES5 and it also converts our JSX to react.createElement version .

Props

Props is an object in which properties are sent from its caller function. It helps us easily to send data from the parent component to the children component. But it will be suffering for passing data from a component to a component that is not its child component.

Virtual DOM

The virtual DOM is only a virtual representation of the DOM. Every time the state of our application changes, the virtual DOM gets updated instead of the real DOM.

State

It is a React special thing. We can save the state of a variable and can also update it by using the React state. If we use a normal variable, we cannot change it while rendering, but using state we can do it using the state function that is provided to update the state variable

Context API

It is a great thing to share data from any component to any component. It is called an alternative solution for Redux. We can create it in the parent component and send the data from the parent component to other components using the provider.

Hooks

Hooks are a special function, that can only be used React functional component not an in-class component. Every hook begins with the word “use”.

React.render()

the React. render() method used to render react element/component to the Browser DOM.

PropTypes

Props is an object in which properties are sent from its caller function. Sometimes we need to declare a type to prop, then we will use the PropTypes method. These type can be number, string, object, etc

--

--