FullStackFSCCafé
 
 
Sign in with GoogleSign in with Google. Opens in new tab
Kill Your Tech Interview
3877 Full-Stack, Algorithms & System Design Interview Questions
Answered To Get Your Next Six-Figure Job Offer
      
🤖 Having Machine Learning & DS Interview? Check  MLStack.Cafe - 1704 Data Science & ML Interview Questions & Answers!Having ML & DS Interview? Check 🤖 MLStack.Cafe - 1704 ML & DS Interview Questions and Answers

Top 130 React Interview Questions

Entry Junior Mid Senior Expert
Sign in with GoogleSign in with Google. Opens in new tab
Topic Progress:

Theoretical Questions

Q1:   

What are props in React?

  
Add to PDF   Entry 
Q2:   

What are the major features of ReactJS?

  
Add to PDF   Entry 
Q3:   

How does React work?

  
Add to PDF   Entry 
Q4:   

What is React?

  
Add to PDF   Entry 
Q5:   

What are React Hooks?

  Related To: React Hooks
Add to PDF   Entry 
Q6:   

What is the use of refs?

  
Add to PDF   Entry 
Q7:   

What are the advantages of ReactJS?

  
Add to PDF   Entry 
Q8:   

What is Context API in ReactJS?

  
Add to PDF   Entry 
Q9:   

How would you write an inline style in React?

  
Add to PDF   Entry 
Q10:   

What are inline conditional expressions in ReactJS?

  
Add to PDF   Junior 
Q11:   

What are Stateful components in React?

  
Add to PDF   Junior 
Q12:   

What is Reconciliation in ReactJS?

  
Add to PDF   Junior 
Q13:   

What is the purpose of using super constructor with props argument in React?

  
Add to PDF   Junior 
Q14:   

What happens when you call setState?

  
Add to PDF   Junior 
Q15:   

What is the difference between Element and Component in ReactJS?

  
Add to PDF   Junior 
Q16:   

What are Higher-Order Components (HOC) in React?

  
Add to PDF   Junior 
Q17:   

What are the advantages of using React?

  
Add to PDF   Junior 
Q18:   

What is the difference between Component and Container in Redux?

  Related To: Redux
Add to PDF   Junior 
Q19:   

What is JSX?

  
Add to PDF   Junior 
Q20:   

What are the limitations of React?

  
Add to PDF   Junior 
Q21:   

What happens during the lifecycle of a React component?

  
Add to PDF   Junior 
Q22:   

What are advantages of using React Hooks?

  Related To: React Hooks
Add to PDF   Junior 
Q23:   

What are portals in React and when do we need them?

  
Add to PDF   Junior 
Q24:   

What is the purpose of callback function as an argument of setState?

  
Add to PDF   Junior 
Q25:   

What are Stateless components in React?

  
Add to PDF   Junior 
Q26:   

How is React different from AngularJS (1.x)?

  
Add to PDF   Junior 
Q27:   

What are two types of components in ReactJS?

  
Add to PDF   Junior 
Q28:   

What is the difference between state and props?

  
Add to PDF   Junior 
Q29:   

What are the differences between a Class component and Functional component?

  
Add to PDF   Junior 
Q30:   

What does it mean for a component to be mounted in React?

  
Add to PDF   Junior 
Q31:   

What are refs used for in React?

  
Add to PDF   Junior 
Q32:   

What is the difference between a Presentational component and a Container component?

  
Add to PDF   Junior 
Q33:   

What's the difference between a Controlled component and an Uncontrolled one in React?

  
Add to PDF   Junior 
Q34:   

What is useState() in React?

  Related To: React Hooks
Add to PDF   Junior 
Q35:   

What are Controlled components in ReactJS?

  
Add to PDF   Junior 
Q36:   

What is state in React?

  
Add to PDF   Junior 
Q37:   

How to call loading function with React useEffect only once?

  Related To: React Hooks
Add to PDF   Junior 
Q38:   

How to access DOM elements in React?

  Related To: React Hooks
Add to PDF   Junior 
Q39:   

What is the difference between state and props?

  
Add to PDF   Junior 
Q40:   

What are Fragments in React?

  
Add to PDF   Junior 
Q41:   

When rendering a list what is a key and what is it's purpose?

  
Add to PDF   Junior 
Q42:   

How to create refs in React?

  
Add to PDF   Junior 
Q43:   

What is the difference between createElement and cloneElement?

  
 Add to PDF   Mid 
Q44:   

When would you use useRef?

  Related To: React Hooks
 Add to PDF   Mid 
Q45:   

Which lifecycle methods of class component is replaced by useEffect in functional component?

  Related To: React Hooks
 Add to PDF   Mid 
Q46:   

What is the significance of keys in ReactJS?

  
 Add to PDF   Mid 
Q47:   

What is StrictMode in React?

  
 Add to PDF   Mid 
Q48:   

What's the difference between useRef and createRef?

  
 Add to PDF   Mid 
Q49:   

How would you pass data from child to parent component in React?

  
 Add to PDF   Mid 
Q50:   

What would be the common mistake of function being called every time the component renders?

  
 Add to PDF   Mid 
Q51:   

How can I make use of Error Boundaries in functional React components?

  Related To: React Hooks
 Add to PDF   Mid 
Q52:   

Why we should not update state directly?

  
 Add to PDF   Mid 
Q53:   

Do React Hooks cover all use cases for class components?

  Related To: React Hooks
 Add to PDF   Mid 
Q54:   

Compare useState and useReducer implementations

  Related To: React Hooks
 Add to PDF   Mid 
Q55:   

Are you familiar with Flux in the context of React?

  
 Add to PDF   Mid 
Q56:   

What are the advantages of Batching in ReactJS?

  Related To: React Hooks
 Add to PDF   Mid 
Q57:   

What is the difference between HTML and React event handling?

  
 Add to PDF   Mid 
Q58:   

What are Error Boundaries in ReactJS?

  
 Add to PDF   Mid 
Q59:   

What does Batching mean in ReactJS?

  Related To: React Hooks
 Add to PDF   Mid 
Q60:   

What is Components Composition in React?

  
 Add to PDF   Mid 
Q61:   

What's wrong with using Context in React?

  
 Add to PDF   Mid 
Q62:   

What are Uncontrolled components?

  
 Add to PDF   Mid 
Q63:   

What's the difference between an Element and a Component in React?

  
 Add to PDF   Mid 
Q64:   

What do these three dots (...) in React do?

  
 Add to PDF   Mid 
Q65:   

What's the typical flow of data like in a React + Redux app?

  
 Add to PDF   Mid 
Q66:   

What are some limitations of things you shouldn't do in the component's render method in React?

  
 Add to PDF   Mid 
Q67:   

What is Lifting State Up in ReactJS?

  
 Add to PDF   Mid 
Q68:   

What are Pure Components?

  
 Add to PDF   Mid 
Q69:   

What is prop drilling and how can you avoid it?

  
 Add to PDF   Mid 
Q70:   

What are the lifecycle methods of ReactJS class components?

  
 Add to PDF   Mid 
Q71:   

What are the different phases of ReactJS component lifecycle?

  
 Add to PDF   Mid 
Q72:   

What is Key and benefit of using it in lists?

  
 Add to PDF   Mid 
Q73:   

What's the typical pattern for rendering a list of components from an array in React?

  
 Add to PDF   Mid 
Q74:   

What are forward refs?

  
 Add to PDF   Mid 
Q75:   

How would you prevent a component from rendering in React?

  
 Add to PDF   Mid 
Q76:   

What is the difference between ShadowDOM and VirtualDOM?

  
 Add to PDF   Mid 
Q77:   

Why do class methods need to be bound to a class instance?

  
 Add to PDF   Mid 
Q78:   

What is {this.props.children} and when you should use it?

  
 Add to PDF   Mid 
Q79:   

What are Stateless components in React?

  
 Add to PDF   Mid 
Q80:   

What is children prop?

  
 Add to PDF   Mid 
Q81:   

Why React uses className over class attribute?

  
 Add to PDF   Mid 
Q82:   

How to bind methods or event handlers in JSX callbacks?

  
 Add to PDF   Mid 
Q83:   

What does shouldComponentUpdate do and why is it important?

  
 Add to PDF   Mid 
Q84:   

Name the different lifecycle methods for a class components

  
 Add to PDF   Mid 
Q85:   

What is the point of shouldComponentUpdate() method?

  
 Add to PDF   Mid 
Q86:   

When to use useCallback, useMemo and useEffect?

  Related To: React Hooks
 Add to PDF   Senior 
Q87:   

Can you do Components Inheritance in React?

  
 Add to PDF   Senior 
Q88:   

Explain why and when would you use useMemo()?

  Related To: React Hooks
 Add to PDF   Senior 
Q89:   

Can you force a React component to rerender without calling setState?

  
 Add to PDF   Senior 
Q90:   

What is difference between Incremental DOM and Virtual DOM?

  Related To: Angular
 Add to PDF   Senior 
Q91:   

Explain the Virtual DOM concept in React

  
 Add to PDF   Senior 
Q92:   

When would you use flushSync in ReactJS?

  Related To: React Hooks
 Add to PDF   Senior 
Q93:   

When shall we use useReducer hook in ReactJS?

  Related To: React Hooks
 Add to PDF   Senior 
Q94:   

When to use useState vs useReducer?

  Related To: React Hooks
 Add to PDF   Senior 
Q95:   

What is the purpose of super(props)?

  
 Add to PDF   Senior 
Q96:   

How would you store non-state/instance variables in functional React components?

  Related To: React Hooks
 Add to PDF   Senior 
Q97:   

Does React re-render all components and sub components every time setState is called?

  
 Add to PDF   Senior 
Q98:   

What is the difference between using constructor vs getInitialState in React?

  
 Add to PDF   Senior 
Q99:   

Why would you need to bind event handlers to this?

  
 Add to PDF   Senior 
Q100:   

Why doesn't this.props.children.map work?

  
 Add to PDF   Senior 
Q101:   

When is it important to pass props to super(), and why?

  
 Add to PDF   Senior 
Q102:   

How to create Props Proxy for HOC component?

  
 Add to PDF   Senior 
Q103:   

What is the second argument that can optionally be passed to setState and what is its purpose?

  
 Add to PDF   Senior 
Q104:   

How to conditionally add attributes to React components?

  
 Add to PDF   Senior 
Q105:   

What's the difference between useCallback and useMemo in practice?

  Related To: React Hooks
 Add to PDF   Senior 
Q106:   

What's a Pure Functional Component in React?

  
 Add to PDF   Senior 
Q107:   

How would you go about investigating slow React application rendering?

  
 Add to PDF   Senior 
Q108:   

Why does React use SyntheticEvents?

  
 Add to PDF   Senior 
Q109:   

Describe Flux vs MVC?

  Related To: ASP.NET MVC
 Add to PDF   Senior 
Q110:   

Describe how events are handled in React

  
 Add to PDF   Senior 
Q111:   

How to apply validation on props in ReactJS?

  
 Add to PDF   Senior 
Q112:   

When would you use StrictMode component in React?

  
 Add to PDF   Senior 
Q113:   

What is the order of useInsertionEffect, useEffect and useLayoutEffect hooks at component generation ?

  
 Add to PDF   Expert 
Q114:   

What is React Fiber?

  
 Add to PDF   Expert 
Q115:   

Can a custom React hook return JSX?

  Related To: React Hooks
 Add to PDF   Expert 
Q116:   

What is the key architectural difference between a JavaScript library such as React and a JavaScript framework such as Angular?

  
 Add to PDF   Expert 
Q117:   

How to avoid the need for binding in React?

  
 Add to PDF   Expert 
Q118:   

What is a Pure Function?

  
 Add to PDF   Expert 
Q119:   

How to use React.memo()?

  
 Add to PDF   Expert 
Q120:   

How does React renderer work exactly when we call setState?

  
 Add to PDF   Expert 
Q121:   

Explain some difference between Flux and AngularJS (1.x) approach

  
 Add to PDF   Expert 

Code Challenges

Q1:   

Provide an example of any simple Custom React Hook. Why do we need Custom Hooks?

  Related To: React Hooks
 Add to PDF   Junior 
Q2:   

Given the React code defined above, can you identify two problems?

  
  Add to PDF   Mid 
Q3:   

What's wrong with that code?

  
  Add to PDF   Mid 
Q4:   

What is equivalent of this code using React Hooks?

  Related To: React Hooks
  Add to PDF   Mid 
Q5:   

What is equivalent of the following using React.createElement?

  
  Add to PDF   Mid 
Q6:   

How to mitigate multiple component re-renders when using multiple useState calls?

  Related To: React Hooks
  Add to PDF   Senior 
Q7:   

If you created a React element like Twitter below, what would the component definition of Twitter look like?

  
  Add to PDF   Senior 
Q8:   

What is wrong with this code?

  
  Add to PDF   Senior 
Q9:   

How would you optimise this code using one of the React Hooks?

  Related To: React Hooks
  Add to PDF   Expert 
 

Rust has been Stack Overflow’s most loved language for four years in a row and emerged as a compelling language choice for both backend and system developers, offering a unique combination of memory safety, performance, concurrency without Data races...

Clean Architecture provides a clear and modular structure for building software systems, separating business rules from implementation details. It promotes maintainability by allowing for easier updates and changes to specific components without affe...

Azure Service Bus is a crucial component for Azure cloud developers as it provides reliable and scalable messaging capabilities. It enables decoupled communication between different components of a distributed system, promoting flexibility and resili...

Cosmos DB has gained popularity among developers and organizations across various industries, including finance, e-commerce, gaming, IoT, and more. Follow along and learn the 24 most common and advanced Azure Cosmos DB interview questions and answers...
More than any other NoSQL database, and dramatically more than any relational database, MongoDB's document-oriented data model makes it exceptionally easy to add or change fields, among other things. It unlocks Iteration on the project. Iteration f...
Unit Tests and Test Driven Development (TDD) help you really understand the design of the code you are working on. Instead of writing code to do something, you are starting by outlining all the conditions you are subjecting the code to and what outpu...
Domain-Driven Design is nothing magical but it is crucial to understand the importance of Ubiquitous Language, Domain Modeling, Context Mapping, extracting the Bounded Contexts correctly, designing efficient Aggregates and etc. before your next DDD p...
At its core, Microsoft Azure is a public cloud computing platform - with solutions including Infrastructure as a Service (IaaS), Platform as a Service (PaaS), and Software as a Service (SaaS) that can be used for services such as analytics, virtual c...
As an asynchronous event-driven JavaScript runtime, Node.js is designed to build scalable network applications. Follow along to refresh your knowledge and explore the 52 most frequently asked and advanced Node JS Interview Questions and Answers every...
Dependency Injection is most useful when you're aiming for code reuse, versatility and robustness to changes in your problem domain. DI is also useful for decoupling your system. DI also allows easier unit testing without having to hit a database and...