Prepare Interview

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

React Interview Questions and Answers

Related differences

Angular vs React

Ques 16. What are some of the advantages of using create-react-app in React?

Making use of create-react-app is advantageous in the following way:

  • Support for JSX, ES6, and flow statements
  • Already built and ready auto-prefixed CSS
  • Fast interactive testing components
  • Live development servers that help in debugging
  • Scripts to handle JSS, CSS, and other files

Is it helpful? Add Comment View Comments
 

Ques 17. What is the meaning of Redux?

Redux is used to store the state of the application in a single entity. This simple entity is usually a JavaScript object. Changing states can be done by pushing out actions from the application and writing corresponding objects for them that are used to modify the states.

For example:

{  first_name: ‘John’,  last_name : ‘Kelly’,  age: 25}

Is it helpful? Add Comment View Comments
 

Ques 18. What is the difference between props and states?

Props:

  • Changes in child components: Yes
  • Parent component changing values: Yes
  • Changes inside components: No

States:

  • Changes in child components: No
  • Parent component changing values: No
  • Changes inside components: Yes

Is it helpful? Add Comment View Comments
 

Ques 19. What are the three phases of a component life cycle in React?

The following are the three phases of a component life cycle:

  • Initial rendering: This is the phase that involves the beginning of the journey of the component to the DOM.
  • Update: Here, the component can be updated and rendered again if required after it gets added to the DOM.
  • Unmounting: The final phase involves the destruction of the component and its eventual removal from the DOM.

Is it helpful? Add Comment View Comments
 

Ques 20. What are events in React?

Whenever there are actions performed in React, such as hovering the mouse or pressing a key on the keyboard, these actions trigger events. Events then perform set activities as a response to these triggers. Handling an event in React is very similar to that in the DOM architecture.

Is it helpful? Add Comment View Comments
 

Most helpful rated by users:

©2024 WithoutBook