React Interview Questions: Props, State, Hooks and Keys Explained
React interview essentials made simple
Learn components, props, state, hooks, keys and the virtual DOM with everyday examples, real interview questions and model answers.
React is a JavaScript library for building user interfaces. React questions come up in many full-stack and front-end interviews, from campus drives to experienced roles. Interviewers rarely want textbook lines. They want to see that you understand why React works the way it does.
In this lab you will learn the five ideas that come up again and again: components, props and state, hooks, keys and the virtual DOM. You will also practise one clear way to answer any React concept question in under a minute.
The big idea: Define, Example, Why
Every React concept question can be answered in three short steps. This works for props, hooks, keys and anything else they ask.
Spot the difference
Question: “What is the difference between props and state?” Switch between the two answers and watch what changes.
Quick concept check
Tap each card to flip it and check your answer.
Key concepts, explained simply
Everyday picture first, then the correct technical answer.
import { useState, useEffect } from 'react';
function Counter({ label }) {
const [count, setCount] = useState(0);
useEffect(() => {
document.title = label + ': ' + count;
}, [label, count]);
return <button onClick={() => setCount(count + 1)}>{label}: {count}</button>;
}
Build a concept answer
Fill the blanks. Your answer writes itself on the right.
Three model answers you can adapt
Two common concept questions and one “explain your React project” answer.
“useState is a hook that lets a function component remember a value between renders. It returns the current value and a setter function. In my to-do app, I kept the list of tasks in state. When a user added a task, I called setTasks with a new array instead of pushing into the old one, so React noticed the change and re-rendered the list.”
“Keys tell React which list item is which when the list changes. I use a stable id from the data, like the product id from the API. I avoid the array index when items can be deleted or reordered, because React may then match the wrong item and show old input values in the wrong row.”
“In my final-year project, a college events portal, I built the frontend in React with Vite. I split the UI into components like EventCard and Filters, passed event data down as props, and kept the selected filter in state. I used useEffect to fetch events from our Node.js API when the page loaded, and showed a loading message while waiting.”
Four mistakes that quietly cost you the job
Test yourself
Question 1 of 5
Rehearse before the real thing
Press start and explain “props vs state” out loud using Define, Example, Why. A strong concept answer usually fits in 45 to 60 seconds. Stop before 90.
- 1Props in, state inside
- 2Never change state directly
- 3Use stable ids as keys
- ★Define, example, why
Screenshot it. Save it. Share it.
Keep this card on your phone and look at it five minutes before your interview.
Quick answers
Do I still need to learn class components?
New React code uses function components and hooks, and the official docs teach those first. But many older company projects still have class components, so know the basics: this.state, setState and lifecycle methods like componentDidMount.
Why does my useEffect run twice in development?
In development, React Strict Mode runs your effect setup and cleanup one extra time when the component mounts. This helps you catch missing cleanup. It does not happen in the production build.
Should I use Create React App for a new project?
No. The React team deprecated Create React App in 2025. For new projects, the React docs suggest a framework such as Next.js, or a build tool such as Vite if you want to set things up yourself.
Is React a library or a framework?
React calls itself a library for building user interfaces. It handles the view part. For routing, data loading and server rendering, you add other tools or use a framework built on React, like Next.js.

One Comment