Interview - React

Explain yield catchphrase in JavaScript

The yield catchphrase is utilized to delay and resume a generator work, which is known as yield catchphrase.

Give me two most significant drawbacks of React.

  • Integrating React with the MVC framework like Rails requires complex configuration.
  • React require the users to have knowledge about the integration of user interface into MVC framework.

How can you update state in react js ?

A state can be updated on the component directly or indirectly.

Name the important features of React

Here, are the important features of React.


  • Allow you to use 3rd party libraries
  • Time-Saving
  • Faster Development
  • Simplicity and Composable
  • Fully supported by Facebook
  • Code Stability With One-directional data binding React Components

Name two types of React component

  • Function component
  • Cass component

State the difference between Real DOM and Virtual DOM

Real DOM

  • It is updated slowly.
  • It allows a direct update from HTML.
  • It wastes too much memory.


Virtual DOM

  • It updates faster.
  • It cannot be used to update HTML directly.
  • Memory consumption is less.

State the main difference between Pros and State

The main difference the two is that the State is mutable and Pros are immutable.

What are children prop ?

Children props are used to pass component to other components as properties.

What are Props in react js ?

Props mean properties, which is a way of passing data from parent to child. We can say that props are just a communication channel between components. It is always moving from parent to child component.

What are reacted portals ?

Portal allows you to render children into a DOM node. CreatePortalmethod is used for it.

What is an action in Redux ?

It is a function which returns an action object. THe action-type and the action data are always stored in the action object. Actions can send data between the Store and the software application. All information retrieved by the Store is produced by the actions.

What is an Event in React ? How do you create one ?