Tuesday 19 October 2021

React JS Interview Questions

 1.     What Is Reactjs?

Ans: React is an open source JavaScript front end UI library developed by Facebook  for creating interactive, stateful & reusable UI components for web and mobile app. It is used by Facebook, Instagram and many more web apps. ReactJS is used for handling view layer for web and mobile applications. One of React’s unique major points is that  it perform not only on the client side, but also can be rendered on server side, and they can work together inter-operably.

2.     Why Reactjs Is Used?

Ans: React is used to handle the view part of Mobile application and Web application.

3.     Does Reactjs Use Html?

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

4.     When Reactjs Released?

Ans: March 2013

5.     What Is Current Stable Version Of Reactjs?

Ans:

  • Version: 15.5
  • Release on: April 7, 2017

6.     What Are The Life Cycle Of Reactjs?

Ans:

  • Initialization
  • State/Property Updates
  • Destruction

7.     What Are The Feature Of Reactjs?

Ans:

  • JSX: JSX is JavaScript syntax extension.
  • Components : React is all about components.
  • One direction flow: React implements one way data flow which makes it easy to reason about your app

8.     What Are The Advantages Of Reactjs?

Ans:

  • React uses virtual DOM which is JavaScript object. This will improve apps performance
  • It can be used on client and server side
  • Component and Data patterns improve readability.
  • Can be used with other framework also.

9.     How To Embed Two Components In One Component?

Ans: import React from 'react'; class App extends React.Component { render() { return (

); } } class Header extends React.Component { render() { return (

Header

);

10.  What Are The Advantages Of Using Reactjs?

Ans: Advantages of ReactJS:

  • React uses virtual DOM which is JavaScript object. This improves application performance as JavaScript virtual DOM is faster than the regular DOM.
  • React can be used on client and as well as server side too.
  • Using React increases readability and makes maintainability easier. Component, Data patterns improves readability and thus makes it easier for manitaing larger apps.
  • React can be used with any other framework (Backbone.js, Angular.js) as it is only a view layer.
  • React’s JSX makes it easier to read the code of our component. It’s really very easy to see the layout. How components are interacting, plugged and combined with each other in app.

11.  What Are The Limitations Of Reactjs?

Ans: Limitations of ReactJS:

  • React is only for view layer of the app so we still need the help of other technologies to get a complete tooling set for development.
  • React is using inline templating and JSX. This can seem awkward to some developers.
  • The library of react  is too  large.
  • Learning curve  for ReactJS may be steep.

 

How To Use Forms In Reactjs?

Ans: In React’s virtual DOM, HTML Input element presents an interesting problem. With the others DOM environment, we can  render the input or textarea and thus allows the browser maintain its   state that is (its value). we can then get and set the value implicitly with the DOM API. In HTML, form elements such as 

 

No comments:

Post a Comment