a) ReactJS:

React is an open-source front-end JavaScript library. It is also a declarative, efficient, and flexible JavaScript library. It was built for making user interfaces. It is maintained by Facebook and a community of individual developers and companies. It was initially released in May 2013.

b) Why React named as “react”:

In react component when it changes the state, The UI represents these changes. This change has to be reflected in the device. It needs to update the DOM tree in the browser. In react we do not do that manually. React can update that automatically when it's needed.

c) What are hooks?

Hooks are functions that let you hook into react function component. They have a few built-in Hooks like useState. They don't work inside classes. Using this you can use react without classes. Some React Hooks are:

useState: It is used to set value. You can increase or decrease your state value by calling in function or other ways.

useEffect: It is used to command React component that, do something after render.

d) React Components:

React lets you define components as classes or functions. Components define as classes which provide more features currently. To define a react component you need to extend react.component like as follows:

class Greetings extends React.component{

render(){

return <h1>Hello, {this.props.name}</h1>

}

}

e) Constructor:

The constructor is called for a React Component before it is mounted. To implement the constructor for a react.component has to call super(props) before any other statement. Otherwise, this.props will be undefined in the constructor.

React constructors are used two purposes:

i. Initializing local state.

ii. Binding even handler method

f) Error Boundaries:

Error boundaries are another important parts of react. It catch JavaScript errors anywhere in react child component tree, log those errors and display a fallback UI. During the rendering error, boundaries catch errors. It is only used for recovering unexpected exceptions; don’t try to use them for control flow.

g) State:

The state contains specific data and that component may change over time. It is user-defined and should be plain JavaScript. If some value is not used for rendering, you don’t have to put it in the state.

h) setState

d) Virtual-DOM

e) React Component

e) Constructor

f) setState

g) forceUpdate

h) displayName

i) jsx

j) Children in jsX

Web Developer