React js interview question - akshayrajoria/reactprepration GitHub Wiki

  1. Which Version right now you are using in react ?

Ans : "axios": "^0.17.1", "dotenv": "^5.0.0", "react": "^16.2.0", "react-dom": "^16.2.0", "react-id-swiper": "^1.6.1", "react-redux": "^5.0.5", "react-router": "^3.0.2", "react-router-dom": "^4.1.2", "react-scripts": "1.1.1", "redux": "^3.5.2", "redux-thunk": "^2.1.0"

  1. Does ReactJS use HTML?

ANS : No, It uses JSX which is simiar to HTM.

  1. What do you know about the component lifecycle in ReactJS? ANS : Component lifecycle is an essential part of this platform. Basically, they have lifecycle events that fall in the three prime categories which are property updates, Initialization and third are Destruction. They are generally considered as a method of simply managing the state and properties of every reach component.

  2. What are the life Cycle of ReactJS?

ANS : 1. Initialization 2. State/Property Updates 3. Destruction 5) When ReactJS released?

ANS : March 2013

  1. What do you mean by Redux?

ANS : Many times there is a need to handle the data of an app in a reliable manner. For such tasks, Redux is used. It accurately performs its task and always makes sure that the entire data has been controlled. It is also possible to apply filters in case only a specific part of data is required.

  1. What is current stable version of ReactJS?

ANS : Version: 15.5 current version - 16.5.2 Release on: April 7, 2017

  1. What do you understand from “In React, everything is a component.”

ANS: Components are the building blocks of a React application’s UI. These components split up the entire UI into small independent and reusable pieces. Then it renders each of these components independent of each other without affecting the rest of the UI.

  1. Explain the purpose of render() in React.

ANS: Each React component must have a render() mandatorily. It returns a single React element which is the representation of the native DOM component. If more than one HTML element needs to be rendered, then they must be grouped together inside one enclosing tag such as

, ,
etc. This function must be kept pure i.e., it must return the same result each time it is invoked.
  1. What are the features of React?

ANS: Major features of React are listed below: It uses the virtual DOM instead of the real DOM. It uses server-side rendering. It follows uni-directional data flow or data binding.

⚠️ **GitHub.com Fallback** ⚠️