Sign in to unlock

Get unlimited access to all questions and answers

checked

Get lifetime access

checked

Track progress

checked

Save time

The fastest way to prepare
for a tech interview

Check our curated list of full-stack, data structures & software architecture interview questions and answers for developers

React interview questions

React interview questions.

Only challenges
Topic progress: 0%
  • 1.

    What is React?

    premium question
    completed

    Answer:

  • 2.

    How does React work under the hood?

    premium question
    completed

    Answer:

  • 3.

    What are some key advantages of building UIs with React?

    premium question
    completed

    Answer:

  • 4.

    What are some potential limitations or disadvantages of React?

    premium question
    completed

    Answer:

  • 5.

    What is JSX?

    premium question
    completed

    Answer:

  • 6.

    What is state in React?

    premium question
    completed

    Answer:

  • 7.

    What is the difference between state and props ?

    premium question
    completed

    Answer:

  • 8.

    What are React Hooks?

    premium question
    completed

    Answer:

  • 9.

    What benefits do React Hooks provide over class components ?

    premium question
    completed

    Answer:

  • 10.

    Can you show an example of a simple custom React Hook and why they are useful?

    premium question
    completed

    Answer:

  • 11.

    What are refs used for in React?

    premium question
    completed

    Answer:

  • 12.

    Why pass props to the super() constructor in React classes ?

    premium question
    completed

    Answer:

  • 13.

    How can you apply inline styling in React?

    premium question
    completed

    Answer:

  • 14.

    How do Class and Functional components differ in React?

    premium question
    completed

    Answer:

  • 15.

    How do Presentational and Container components differ in React?

    premium question
    completed

    Answer:

  • 16.

    What are Higher-Order Components in React and how are they useful?

    premium question
    completed

    Answer:

  • 17.

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

    premium question
    completed

    Answer:

  • 18.

    Walk through what happens when you call setState() in React

    premium question
    completed

    Answer:

  • 19.

    Why pass a callback function to setState() in React?

    premium question
    completed

    Answer:

  • 20.

    How does the useState() hook work in React?

    premium question
    completed

    Answer:

  • 21.

    What is the purpose of the Context API in ReactJS and when is it useful?

    premium question
    completed

    Answer:

  • 22.

    What problem do Fragments solve in React?

    premium question
    completed

    Answer:

  • 23.

    How can you ensure a function runs only once with useEffect() in React?

    premium question
    completed

    Answer:

  • 24.

    What role do props play in React components?

    premium question
    completed

    Answer:

  • 25.

    When and why are refs useful in React?

    premium question
    completed

    Answer:

  • 26.

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

    premium question
    completed

    Answer:

  • 27.

    When rendering a list what is a key and what is its purpose?

    premium question
    completed

    Answer:

  • 28.

    What is the typical way to create and use refs in React?

    premium question
    completed

    Answer:

  • 29.

    What are some characteristics of Stateful components in React?

    premium question
    completed

    Answer:

  • 30.

    What are some characteristics of Stateless components in React?

    premium question
    completed

    Answer:

  • 31.

    What problem do portals solve in React and when would you use them?

    premium question
    completed

    Answer:

  • 32.

    How are Components and Containers different in Redux?

    premium question
    completed

    Answer:

  • 33.

    How can you use inline conditional expressions in ReactJS?

    premium question
    completed

    Answer:

  • 34.

    What is the Reconciliation process in ReactJS?

    premium question
    completed

    Answer:

  • 35.

    How are Elements and Components different in ReactJS?

    premium question
    completed

    Answer:

  • 36.

    What are some ways to access DOM elements in React?

    premium question
    completed

    Answer:

  • 37.

    What are the main phases in the React component lifecycle ?

    premium question
    completed

    Answer:

  • 38.

    Why is directly modifying state a bad idea in React?

    premium question
    completed

    Answer:

  • 39.

    Why are keys useful and how should they be used when rendering lists in React?

    premium question
    completed

    Answer:

  • 40.

    What is Component Composition in React and why is it useful?

    premium question
    completed

    Answer:

  • 41.

    How are useState() and useReducer() different in React?

    premium question
    completed

    Answer:

  • 42.

    Are there any limitations of React Hooks compared to classes?

    premium question
    completed

    Answer:

  • 43.

    How do Pure Components in React improve performance?

    premium question
    completed

    Answer:

  • 44.

    What problem do Error Boundaries solve in React?

    premium question
    completed

    Answer:

  • 45.

    How does StrictMode help when developing React apps?

    premium question
    completed

    Answer:

  • 46.

    How can shouldComponentUpdate() improve React performance?

    premium question
    completed

    Answer:

  • 47.

    Can you explain the Flux pattern and how it relates to React?

    premium question
    completed

    Answer:

  • 48.

    What does the {this.props.children} prop allow you to do in React?

    premium question
    completed

    Answer:

  • 49.

    How can you prevent a React component from unnecessary rendering ?

    premium question
    completed

    Answer:

  • 50.

    What is the typical way to render a list of components from an array in React?

    premium question
    completed

    Answer:

  • 51.

    What does the typical data flow look like in a React + Redux app?

    premium question
    completed

    Answer:

  • 52.

    What are some limitations on what you should do inside the component render method in React?

    premium question
    completed

    Answer:

  • 53.

    What are some ways to correctly bind event handlers in React classes?

    premium question
    completed

    Answer:

  • 54.

    What is prop drilling and how can you avoid it in React?

    premium question
    completed

    Answer:

  • 55.

    What is the purpose of shouldComponentUpdate() in React?

    premium question
    completed

    Answer:

  • 56.

    How do forward refs work in React?

    premium question
    completed

    Answer:

  • 57.

    What does the spread syntax (...) do in React?

    premium question
    completed

    Answer:

  • 58.

    How are Shadow DOM and Virtual DOM different in React?

    premium question
    completed

    Answer:

  • 59.

    Why bind class methods and event handlers to this in React classes?

    premium question
    completed

    Answer:

  • 60.

    What are some benefits of using Stateless Functional Components in React?

    premium question
    completed

    Answer:

  • 61.

    Why does React use className instead of the HTML class attribute?

    premium question
    completed

    Answer:

  • 62.

    What does Lifting State Up mean in React?

    premium question
    completed

    Answer:

  • 63.

    How are useRef() and createRef() different in React?

    premium question
    completed

    Answer:

  • 64.

    What's the difference between React.createElement() and React.cloneElement() ?

    premium question
    completed

    Answer:

  • 65.

    What common mistake leads to functions being called incorrectly on each render?

    premium question
    completed

    Answer:

  • 66.

    How does React event handling differ from native HTML events ?

    premium question
    completed

    Answer:

  • 67.

    What are some downsides of using React Context ?

    premium question
    completed

    Answer:

  • 68.

    What does Batching mean in React and how does it improve performance?

    premium question
    completed

    Answer:

  • 69.

    Which class component lifecycle methods can be replaced by useEffect() ?

    premium question
    completed

    Answer:

  • 70.

    What are some ways to handle errors with Error Boundaries in function components?

    premium question
    completed

    Answer:

  • 71.

    When is it useful to use the useRef() hook in React?

    premium question
    completed

    Answer:

  • 72.

    What are some ways to pass data from child to parent in React?

    premium question
    completed

    Answer:

  • 73.

    What is the optional second callback argument that can be passed to setState() ?

    premium question
    completed

    Answer:

  • 74.

    How would you manually create this JSX element without using JSX ?

    premium question
    completed

    Answer:

  • 75.

    Can you spot two potential issues with the React component code shown?

    premium question
    completed

    Answer:

  • 76.

    How to rewrite this React class component code using hooks instead?

    premium question
    completed

    Answer:

  • 77.

    What might be problematic about handling state like this in React?

    premium question
    completed

    Answer:

  • 78.

    How does component initialization differ between constructor() and getInitialState() in React?

    premium question
    completed

    Answer:

  • 79.

    What are some ways to validate props in React components?

    premium question
    completed

    Answer:

  • 80.

    What are the key differences between Flux and MVC patterns?

    premium question
    completed

    Answer:

  • 81.

    Is it possible to force a component to re-render without setState() in React?

    premium question
    completed

    Answer:

  • 82.

    Why does React use Synthetic Events ?

    premium question
    completed

    Answer:

  • 83.

    How would you debug performance issues with slow component rendering in React?

    premium question
    completed

    Answer:

  • 84.

    What makes a component a Pure Functional one in React?

    premium question
    completed

    Answer:

  • 85.

    Why is it important to pass props to the super() constructor in React classes?

    premium question
    completed

    Answer:

  • 86.

    Why bind event handlers to this in React class components?

    premium question
    completed

    Answer:

  • 87.

    Why doesn't this.props.children.map() work as expected in React?

    premium question
    completed

    Answer:

  • 88.

    How could you create a Props Proxy in a React higher order component?

    premium question
    completed

    Answer:

  • 89.

    What are some ways to conditionally render attributes in React components?

    premium question
    completed

    Answer:

  • 90.

    Does React re-render all components when setState() is called?

    premium question
    completed

    Answer:

  • 91.

    How does React handle events differently than regular DOM events ?

    premium question
    completed

    Answer:

  • 92.

    In what cases might you use the StrictMode component in React?

    premium question
    completed

    Answer:

  • 93.

    When should you use useCallback() , useMemo() and useEffect() in React components?

    premium question
    completed

    Answer:

  • 94.

    Is true inheritance possible between components in React?

    premium question
    completed

    Answer:

  • 95.

    How do Incremental DOM and Virtual DOM differ in React?

    premium question
    completed

    Answer:

  • 96.

    When might you need to use ReactDOM.flushSync() ?

    premium question
    completed

    Answer:

  • 97.

    When is the useReducer() hook useful in React?

    premium question
    completed

    Answer:

  • 98.

    How to store non-reactive state in React function components?

    premium question
    completed

    Answer:

  • 99.

    If you rendered a Twitter React element like below, how might the Twitter component be implemented?

    premium question
    completed

    Answer:

  • 100.

    Is there anything potentially wrong or suboptimal about this use of React's setState() ?

    premium question
    completed

    Answer:

  • 101.

    How can you prevent multiple re-renders when using several useState() hooks?

    premium question
    completed

    Answer:

  • 102.

    How does React as a UI library differ from Angular as a framework ?

    premium question
    completed

    Answer:

  • 103.

    What are some differences between Flux and AngularJS approaches?

    premium question
    completed

    Answer:

  • 104.

    What does React Fiber aim to improve?

    premium question
    completed

    Answer:

  • 105.

    How can you avoid the need for binding in React class components?

    premium question
    completed

    Answer:

  • 106.

    How and why would you use React.memo() ?

    premium question
    completed

    Answer:

  • 107.

    Is it a good idea for custom React hooks to return JSX ?

    premium question
    completed

    Answer:

  • 108.

    What is the order of execution of useInsertionEffect() , useEffect() , and useLayoutEffect() ?

    premium question
    completed

    Answer:

  • 109.

    How could you optimize this component with slow list filtering using a React Hook ?

    premium question
    completed

    Answer:

One tip that got me hired by Google, Microsoft, and Stripe

I've worked for Microsoft, Google, Stripe, and received offers from many other companies. One thing I learned when I was interviewing myself is that standard interview tips are woefully inadequate.

Reverse Tech Interview: Questions to Stump an Interviewer

Few people want to get into an uncomfortable environment or an unprofitable company with no prospects. If you’re wondering how to get a real feel for a company during an interview, you’re welcome. I’ll give a list of questions that interviewers don’t usually expect...

How to become a programmer, move to the US, and get a dream job

Are you curious about what you need to do to earn more than $15.000 a month, drive a Tesla, live in sunny California, and work at Google, Apple, Facebook, or Amazon?

11 Reactive Systems interview questions and answers for software engineers

Reactive systems are an architectural style that allows multiple individual applications to blend into one unit, reacting to their environment, while staying aware of each other. Here is a list of coding interview questions on Reactive Systems to help you get ready for your next data struc...

. Reactive Systems
34 Microservices interview questions and answers for software engineers

Microservice architecture – a variant of the service-oriented architecture structural style – arranges an application as a collection of loosely coupled services. In a microservices architecture, services are fine-grained and the protocols are lightweight. Here is a list of coding intervie...

. Microservices
7 Layering & Middleware interview questions for developers

Middleware in the context of distributed applications is software that provides services beyond those provided by the operating system to enable the various components of a distributed system to communicate and manage data. Middleware supports and simplifies complex distributed application...

. Layering & Middleware
55 Docker interview questions and answers for software engineers

Docker is a set of platform as a service products that use OS-level virtualization to deliver software in packages called containers. Here is a list of coding interview questions on Docker to help you get ready for your next data structures interview in 2021.

. Docker
23 Databases interview questions and answers for software engineers

A database is an organized collection of data, generally stored and accessed electronically from a computer system. Where databases are more complex they are often developed using formal design and modeling techniques. Here is a list of coding interview questions on Databases to help you g...

. Databases
21 Concurrency interview questions and answers for software engineers

In computer science, concurrency is the ability of different parts or units of a program, algorithm, or problem to be executed out-of-order or in partial order, without affecting the final outcome. Here is a list of coding interview questions on Concurrency to help you get ready for your n...

. Concurrency
13 CAP Theorem interview questions and answers for software engineers

In theoretical computer science, the CAP theorem, also named Brewer's theorem after computer scientist Eric Brewer, states that it is impossible for a distributed data store to simultaneously provide more than two out of the following three guarantees: Consistency: Every read receives the ...

. CAP Theorem
Load more posts

Features

folder icon

Access all answers

Get the inside track on what to expect in your next tech interview. We offer you a collection of high quality technical interview questions to help you prepare for your next coding interview.

graph icon

Track progress

A smart interface helps you track your progress and focus on the topics you need. You can search through questions or sort them by difficulty or type.

clock icon

Save time

Save tens of hours searching for information on hundreds of low-quality sites designed to drive traffic and make money from advertising.

Land a six-figure job at one of the top companies.

amazon logo facebook logo google logo microsoft logo uber logo
Prepare for a technical interview

Get hired with our
tech interview questions & answers