Interview Insights · React Developer
Why React Developer Candidates Freeze on the Simplest Questions
Quick summary — Simple React questions
Candidates freeze on simple React questions because they try to sound advanced instead of answering plainly. Basic questions such as 'what is state?', 'why do lists need keys?' or 'what is the difference between props and state?' feel like traps. Many candidates think the interviewer expects a deep, perfect answer, so they search for impressive words and lock up. In reality, I ask simple questions to see whether you understand the foundation clearly. A plain definition, a tiny example and one reason it matters is exactly what I want. This page gives you a method and worked answers for the questions that cause most freezes.
In this guide you will learn:
- Why simple questions cause more freezes than hard ones
- A four-move method for answering any React basic
- Worked answers for state, props, keys and controlled inputs
- Code that shows the key bug many candidates cannot explain
- A daily drill to make basics automatic
SECTION 01Why simple questions feel harder than hard ones
When I ask a hard question, such as how to avoid unnecessary re-renders in a large list, candidates relax a little. They know nobody expects a perfect answer, so they think aloud. When I ask 'what is a component?', the pressure jumps. The candidate feels they must not get it wrong, and they also worry that a simple answer will sound too basic.
That double pressure causes the freeze. The fix is to accept that a simple question deserves a simple answer, delivered calmly, and then let the interviewer go deeper if they want to.
| Thought during the freeze | What actually happens | Better thought | Effect on the answer |
|---|---|---|---|
| They expect something deep | They want the foundation | Plain and correct is enough | Starts quickly |
| A simple answer sounds junior | Clarity sounds senior | Clear words show understanding | Confident tone |
| I must not miss any detail | They will ask for details | Start small, expand if asked | Short, structured |
| I knew this yesterday | Memory blocks under stress | Use an example to recall it | Recovers the thread |
Me: What is state in React?
Candidate: State is... it is the useState hook.
It is like... the state management. We use Redux
also for state. It is very important in React.
Me: Can you give an example?
Candidate: (long pause) Like a counter?
(Mixed terms, no definition, no example until pushed.)Me: What is state in React?
Candidate: State is data a component owns that can
change over time, and when it changes, React
re-renders the component to show the new value.
For example, whether a dropdown is open. I keep it
in useState, and clicking the button toggles it.
It matters because the UI follows the data. I do not
change the page directly; I change the state.
A common mistake is storing things in state that can
be calculated, like a filtered list.
The calm answer takes about twenty seconds. It is not clever, but it shows a clear mental model, and it hands me several directions for my next question.
SECTION 02The key question, with the bug it prevents
'Why do lists need a key?' is one of the most common freezes I see. Many candidates answer 'to remove the console warning', which is true but misses the point. Keys tell React which item is which between renders, so it can keep the right state with the right item when the list changes.
The clearest way to understand this is to see the bug that appears when you use the array index as a key and then remove or reorder items. If you can explain this bug, you will never freeze on the key question again.
| Key choice | When it works | When it breaks | What the user sees |
|---|---|---|---|
| Array index | Static list that never reorders | Items removed, inserted or sorted | Typed text jumps to the wrong row |
| Stable ID from data | Almost always | If IDs repeat | Correct rows keep their state |
| Math.random() | Never | Every render | Inputs reset and lose focus |
| Item name or label | Names are unique and fixed | Two items share a name | Duplicate key warning and odd updates |
import { useState } from "react";
import TaskRow from "./TaskRow";
export default function TaskList() {
const [tasks, setTasks] = useState([
{ id: "t1", title: "Write tests" },
{ id: "t2", title: "Fix login bug" },
{ id: "t3", title: "Update README" },
]);
const remove = (id) => setTasks((ts) => ts.filter((t) => t.id !== id));
// BUG version: key={index}
// Each TaskRow keeps its own note input state.
// Remove the first task and the notes shift up one row.
//
// FIX: key={task.id}, so React matches rows by identity.
return tasks.map((task) => (
<TaskRow key={task.id} task={task} onRemove={remove} />
));
}'A key tells React which item is which between
renders. When the list changes, React uses keys to
match old items with new ones, so each item keeps
its own state and DOM node.
If I use the index and remove the first item, the
second item now has index 0. React thinks it is the
old first item and gives it that item's state, so
a half-typed note can appear on the wrong task.
So I use a stable ID from the data, like task.id.'
Try this yourself: give each row an uncontrolled text box, type into the first one, then remove it with index keys. Seeing the text jump once is enough to remember the answer for good.
SECTION 03Worked answers for the other common freezes
A handful of other basics cause most of the remaining freezes: props versus state, controlled versus uncontrolled inputs, what JSX actually is and what a re-render means. Each one has a short, plain answer and a small example that makes it stick.
Prepare these with the same four moves: define, example, why it matters, common mistake. You do not need to memorise wording. You need to own the idea well enough to say it in your own words under pressure.
| Question | Plain definition | Tiny example | Common mistake |
|---|---|---|---|
| Props vs state? | Props come from the parent; state is owned by the component | A Button gets a label prop; a Dropdown owns isOpen state | Copying a prop into state and letting it go stale |
| Controlled input? | Input value comes from state and changes via onChange | value={email} with setEmail on change | Setting value without onChange, so typing does nothing |
| What is JSX? | Syntax that compiles to function calls creating elements | A tag becomes a React element object | Thinking it is HTML inside JavaScript |
| What is a re-render? | React calling the component again to get new output | State changes, the function runs again | Thinking a re-render always updates the DOM |
import { useState } from "react";
import TextInput from "./TextInput";
// Controlled: React state is the single source of truth
export default function EmailField({ onValid }) {
const [email, setEmail] = useState("");
const isValid = /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email);
const handleChange = (e) => {
const next = e.target.value.trimStart();
setEmail(next);
if (/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(next)) onValid(next);
};
return (
<TextInput
label="Email"
value={email}
onChange={handleChange}
error={email && !isValid ? "Enter a valid email" : ""}
/>
);
}// What you write:
// (a Greeting element with name prop "Asha")
// What the modern JSX transform produces:
import { jsx as _jsx } from "react/jsx-runtime";
const element = _jsx(Greeting, { name: "Asha" });
// element is a plain object, roughly:
// { type: Greeting, props: { name: "Asha" }, key: null }
// So JSX is not HTML. It is a shorter way to write
// function calls that describe UI. That is why you use
// className instead of class and {} for expressions.
Notice that isValid is not stored in state. It is calculated from email on every render. Mentioning this when you explain controlled inputs shows that you also understand derived values, which is a natural follow-up question.
SECTION 04Daily drill to make React basics automatic
Freezing is a pressure problem, and repetition reduces pressure. Use this drill every day for two weeks before interviews. It takes fifteen minutes and needs only a phone recorder.
DAILY BASICS DRILL
1. Pick 5 cards from the question list.
2. For each, answer aloud in 4 moves:
Define -> one plain sentence
Example -> tiny component or situation
Why -> what breaks without it
Mistake -> one common pitfall
3. Record. Keep each answer under 45 seconds.
4. Play back. Mark any answer that started with
'it is like...' or 'basically...'.
5. Redo marked answers once.BASICS THAT CAUSE MOST FREEZES
[ ] What is a component?
[ ] What is state?
[ ] Props vs state?
[ ] Why do lists need keys?
[ ] What is JSX?
[ ] Controlled vs uncontrolled input?
[ ] What is a re-render?
[ ] What does useEffect do?
[ ] What is the virtual DOM?
[ ] What is lifting state up?
[ ] What is a fragment?
[ ] What is conditional rendering?IF YOU FREEZE IN THE ROOM
1. Breathe once. Say: 'Let me give a simple answer.'
2. Start with an example you have built:
'In my todo project, each task...'
3. Name the idea from the example:
'...so the key lets React match each task.'
4. Stop. Let the interviewer ask more.
Never say 'I know this, I forgot' and stop.
An example almost always unlocks the answer.
SECTION 05Habits that stop the freeze before it starts
These small habits lower the pressure of basic questions and keep your answers short and clear.
- Expect the basics — Assume every React interview will include simple questions. Expecting them takes away most of the surprise.
- Keep your own examples — Link each basic idea to something in your own projects so you always have an example ready.
- Avoid filler words — Starting with 'basically' or 'it is like' often leads to rambling. Start with the definition instead.
- Stop after the core answer — Give the four moves and stop. Interviewers prefer asking a follow-up to sitting through a lecture.
- Practise with a real person — Answering a friend or a trainer adds the pressure that recording alone cannot. A mock interview with an Uncodemy trainer is a good way to do this.
SECTION 06Interview Q&A — Simple React questions
Q1What is the difference between props and state?
Props are inputs passed from a parent component and are read-only inside the child. State is data the component owns and can change with its setter. For example, a Button receives its label as a prop, while a Dropdown keeps whether it is open in state. Copying a prop into state is a common mistake because the copy can go stale.
Q2Why should you not use the index as a key?
Because when items are removed, inserted or reordered, indexes move to different items. React then matches the wrong old item to the new one, so local state such as typed text can appear on the wrong row. A stable ID from the data avoids this. Index keys are only safe for lists that never change order.
Q3What is a controlled component?
An input whose value comes from React state and updates through onChange, so React is the single source of truth. It makes validation and formatting easy. An uncontrolled input keeps its own value in the DOM, and you read it with a ref when needed, which can be simpler for basic forms.
Q4What actually happens in a re-render?
React calls the component function again to get new output, compares it with the previous output and updates only the parts of the DOM that changed. So a re-render does not always mean the DOM changes. State changes, parent re-renders and context changes are common triggers.
Q5Is JSX the same as HTML?
No. JSX is a syntax that compiles to JavaScript function calls which create React element objects. It looks like HTML, but uses className instead of class, camelCase event names and curly braces for JavaScript expressions.
SECTION 07Test yourself — Simple React questions quiz
Five questions. No sign-up.
0 / 5Pick an answer to see why it is right or wrong.
SECTION 08Frequently asked questions
What are the basic React interview questions for freshers?
Common ones include what is a component, what is state, props versus state, why lists need keys, what is JSX, controlled versus uncontrolled inputs, what useEffect does and what the virtual DOM is.
Why do I go blank in interviews even when I know the answer?
Stress narrows attention, and many candidates try to build a perfect answer before speaking. Starting with a simple definition or an example from your own work breaks the freeze.
How do I explain state in a React interview?
Say that state is data a component owns that can change over time, and that React re-renders the component when it changes. Give a small example, such as whether a dropdown is open, and mention one mistake, such as storing derived values.
Is using index as key always wrong in React?
No. It is acceptable for static lists that are never reordered, filtered or edited. For lists that change, use a stable unique ID from the data to avoid state appearing on the wrong item.
How can I practise React basics before an interview?
Record yourself answering one basic question at a time using a definition, an example, why it matters and a common mistake. Build tiny demos, such as the index key bug, to see each idea in action.
How can I prepare for React Developer interview answers with a trainer?
Yes. Uncodemy's React JS Training Course in Noida (classroom and online) includes live projects, one-to-one mock interviews and resume reviews, so you practise React Developer interview answers with trainer feedback before the real interview. You can book a free demo class from this page to see how the sessions work.
SECTION 09Related reads
Classroom & online · Noida
Master React basics until they feel easy
Our React JS Training Course builds strong React foundations through small demos, projects and mock interviews, so simple questions never catch you off guard.
Talk to a counsellor for current fees- Core React and JSX
- Hooks with hands-on demos
- Mock technical interviews
- Weekday & weekend batches