Interview Insights · React Developer
What Interviewers Actually Look for in a Fresher React Developer
Quick summary — Fresher React hiring
For a fresher React role, I look for solid JavaScript, clear component thinking, correct hooks use, basic layout skill and fast learning. Many freshers prepare by listing libraries: Redux, Next.js, Tailwind, React Query. Those are useful, but for a first role they matter less than the foundations under them. If your JavaScript is weak, every React bug will feel mysterious. If you cannot split a page into components, every feature becomes one huge file. This page explains the five foundations I look for, the small tests interviewers use to check each one, and how to prepare for them.
In this guide you will learn:
- Why JavaScript comes before React in fresher interviews
- Output questions on closures and async that are often asked
- How to break a UI into components when asked live
- The rules of hooks and the bugs they prevent
- How interviewers judge learning ability in one round
SECTION 01JavaScript first: the foundation under every React answer
React is JavaScript. Hooks rely on closures, data fetching relies on promises, and rendering lists relies on array methods. When a fresher struggles with React, the real gap is often in JavaScript. That is why many fresher React interviews start with a JavaScript round, and why I ask JavaScript questions even in a React-focused interview.
The questions are rarely obscure. They test whether you understand how variables are captured, how async code runs and how to transform arrays without mutating them.
| JavaScript topic | Why it matters in React | Typical question | What a good answer shows |
|---|---|---|---|
| Closures | Hooks and handlers capture values | Predict output of setTimeout in a loop | Understands var vs let scope |
| Promises and async/await | Fetching and loading states | Order of logs with await and setTimeout | Knows microtasks run before timers |
| Array methods | Rendering and updating lists | Group or filter data with map, filter, reduce | Writes non-mutating transforms |
| Spread and destructuring | Immutable state updates | Update one field in a nested object | Copies each changed level |
// Q1: closures and scope
for (var i = 0; i < 3; i++) {
setTimeout(() => console.log("var", i), 0);
}
for (let j = 0; j < 3; j++) {
setTimeout(() => console.log("let", j), 0);
}
// var 3, var 3, var 3, let 0, let 1, let 2
// var is function-scoped: one shared i, already 3.
// let creates a new binding for each iteration.
// Q2: event loop order
console.log("A");
setTimeout(() => console.log("B"), 0);
Promise.resolve().then(() => console.log("C"));
console.log("D");
// A, D, C, B
// Sync code first, then microtasks (promises),
// then macrotasks (timers).const user = {
name: "Asha",
address: { city: "Noida", pin: "201301" },
skills: ["JS", "React"],
};
// Change city and add a skill without mutating user
const updated = {
...user,
address: { ...user.address, city: "Delhi" },
skills: [...user.skills, "TypeScript"],
};
console.log(user.address.city); // Noida (unchanged)
console.log(updated.address.city); // Delhi
console.log(user.skills.length); // 2
// This is exactly how you update nested React state.
If you can explain both output questions and write the immutable update without hesitation, you have covered a large part of what a fresher JavaScript round checks. Practise saying why, not only what.
SECTION 02Component thinking: breaking a page into pieces
A common fresher exercise is to look at a screen, such as a product page or a chat window, and describe how you would split it into components. I am not looking for one correct tree. I want to see whether you group UI by responsibility, decide where state should live and pass data down through props sensibly.
A useful rule is to put state in the closest common parent of the components that need it. If only the search box needs the query, keep it there. If the search box and the results list both need it, lift it to their parent.
| Piece of UI | Component | State it owns | Props it receives |
|---|---|---|---|
| Whole product page | ProductPage | Selected variant, cart status | Product ID from the route |
| Image gallery | ImageGallery | Active image index | List of image URLs |
| Size selector | VariantPicker | None, controlled by parent | Variants, selected value, onChange |
| Add to cart button | AddToCartButton | None, or a short loading flag | Disabled flag, onAdd callback |
ProductPage state: variant, adding
|-- ImageGallery state: activeIndex
|-- ProductInfo props: title, price
|-- VariantPicker props: variants, value, onChange
|-- AddToCartButton props: disabled, onAdd
`-- ReviewsList props: productId
`-- ReviewCard props: review
Why variant lives in ProductPage:
- VariantPicker changes it
- ProductInfo shows the price for that variant
- AddToCartButton needs it to add the right item
So the closest common parent owns it.import { useState } from "react";
import VariantPicker from "./VariantPicker";
import ProductInfo from "./ProductInfo";
import AddToCartButton from "./AddToCartButton";
export default function ProductPage({ product, onAdd }) {
const [variantId, setVariantId] = useState(product.variants[0].id);
const variant = product.variants.find((v) => v.id === variantId);
// An array of keyed elements works like a fragment
return [
<ProductInfo key="info" title={product.title} price={variant.price} />,
<VariantPicker
key="picker"
variants={product.variants}
value={variantId}
onChange={setVariantId}
/>,
<AddToCartButton
key="add"
disabled={variant.stock === 0}
onAdd={() => onAdd(product.id, variantId)}
/>
];
}
Notice that variant is derived from variantId rather than stored separately. Keeping only the ID in state means the variant object can never fall out of sync with the product data.
SECTION 03Hooks rules, layout basics and learning ability
Three more foundations complete the picture. First, the rules of hooks: call hooks only at the top level of a component or custom hook, never inside conditions or loops. React relies on call order to match each hook with its stored state, so breaking the rule causes confusing bugs.
Second, basic CSS layout. A fresher React developer will build screens, so I check that you can centre something, build a responsive card grid and use flexbox without trial and error. Third, learning ability. I sometimes show a small API you have not used and watch how you read the docs and try it.
| Foundation | Quick check I use | Weak sign | Strong sign |
|---|---|---|---|
| Rules of hooks | Spot the bug: useState inside an if | Does not see a problem | Explains hook call order |
| Effect dependencies | Why does this effect run in a loop? | Removes the dependency array | Finds the object recreated each render |
| CSS layout | Make a responsive grid of cards | Fixed widths and many media queries | Grid with auto-fill and minmax |
| Learning ability | Use an unfamiliar browser API from docs | Waits for help | Reads the example, tries it, adjusts |
// BUG 1: hook inside a condition
function Profile({ user }) {
if (!user) return null;
const [tab, setTab] = useState("posts"); // runs only sometimes
// ...
}
// Fix: call useState first, then return early.
// BUG 2: effect loop from a new object each render
function Orders({ userId }) {
const [orders, setOrders] = useState([]);
const filters = { userId, status: "open" }; // new object every render
useEffect(() => {
fetchOrders(filters).then(setOrders);
}, [filters]); // always 'changed' -> runs after every render
}
// Fix: depend on primitives instead
// useEffect(() => {
// fetchOrders({ userId, status: "open" }).then(setOrders);
// }, [userId]);/* Responsive card grid without media queries */
.cards {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
gap: 16px;
}
/* Centre anything inside a box */
.center {
display: flex;
align-items: center;
justify-content: center;
min-height: 200px;
}
/* Card with footer pinned to the bottom */
.card {
display: flex;
flex-direction: column;
}
.card .footer {
margin-top: auto;
}
The effect loop bug is one of the most common real-world React mistakes. A fresher who can explain why a new object in the dependency array keeps the effect running is already ahead of many candidates.
SECTION 04Fresher React preparation checklist
Use this checklist to prepare the five foundations. Tick an item only when you can explain it aloud and show a small example from memory.
JAVASCRIPT
[ ] var, let, const and block scope
[ ] Closures: explain with a counter example
[ ] this in regular vs arrow functions
[ ] Promises, async/await, try/catch
[ ] Event loop: sync, microtasks, macrotasks
[ ] map, filter, reduce, find, some, every
[ ] Spread, rest, destructuring
[ ] == vs ===, truthy and falsy values
[ ] Shallow vs deep copy of objectsREACT
[ ] Components, props, state
[ ] Lists and keys (and the index key bug)
[ ] Controlled forms
[ ] useState with functional updates
[ ] useEffect: dependencies and cleanup
[ ] Rules of hooks and why they exist
[ ] Lifting state up
[ ] Custom hook: write one from scratch
[ ] Context for shared values
[ ] Basic routing with React RouterLAYOUT
[ ] Flexbox: direction, align, justify, gap
[ ] Grid: auto-fill and minmax
[ ] Responsive units: rem, %, vw
[ ] Box model and box-sizing
HABITS
[ ] Git: branch, commit, push, pull request
[ ] Read MDN and React docs for one new API weekly
[ ] Use browser DevTools: elements, console, network
[ ] One deployed project you can explain fully
SECTION 05How to show these foundations in the interview
Knowing the foundations is half the job. These habits help interviewers see them quickly.
- Link React to JavaScript — When explaining a React behaviour, name the JavaScript idea behind it, such as closures or reference equality.
- Draw the component tree — On a whiteboard or in comments, sketch the tree and mark where state lives before writing code.
- Show DevTools comfort — If you can share a screen, use the network tab or React DevTools naturally while debugging.
- Be honest about libraries — Say 'I have read about Redux Toolkit but used Context in my projects'. Honesty is valued more than a long list.
- Practise with feedback — Mock interviews show which foundation is weakest. Book a mock round with an Uncodemy trainer and fix that one first.
SECTION 06Interview Q&A — Fresher React hiring
Q1What is a closure, and where do you see it in React?
A closure is a function that remembers the variables from the scope where it was created. In React, event handlers and effects are closures that capture the props and state of the render they were created in. That is why a handler can see an old value if it was created in an earlier render.
Q2In what order do promise callbacks and setTimeout callbacks run?
Synchronous code runs first. Then the microtask queue runs, which includes promise callbacks. Then the event loop takes the next macrotask, such as a setTimeout callback. So a resolved promise's then callback runs before a zero-delay timeout.
Q3How would you split a chat screen into components?
Something like ChatPage owning the messages and the draft, a MessageList that renders MessageItem components, and a Composer with the input and send button. The draft can live in Composer if nothing else needs it; the messages live in ChatPage because both the list and the composer depend on them.
Q4Why can't you call hooks inside conditions?
React identifies each hook by the order in which it is called during render. If a condition skips a hook on some renders, the order shifts and React gives the wrong stored state to the following hooks. So hooks must be called at the top level, in the same order every time.
Q5Why might an effect run after every render?
Usually because a dependency is a new object, array or function created during each render, so it is never equal to the previous one. The fix is to depend on primitive values, move the object inside the effect, or memoise it with useMemo or useCallback when that is really needed.
SECTION 07Test yourself — Fresher React hiring quiz
Five questions. No sign-up.
0 / 5Pick an answer to see why it is right or wrong.
SECTION 08Frequently asked questions
What skills are required for a fresher React developer job?
Strong JavaScript fundamentals, core React with hooks, component design, basic HTML and CSS layout, Git, and the ability to read documentation and debug with browser tools. One or two well understood projects help a lot.
Do freshers need to know Redux for React interviews?
Not always. Many fresher interviews focus on core React state and Context. Knowing when Redux Toolkit or another store is useful helps, but solid useState, useReducer and Context knowledge matters more.
Is JavaScript asked in React developer interviews?
Yes, very often. Closures, promises, the event loop, array methods and immutable updates are common, because React behaviour depends on them.
How many projects should a fresher React developer have?
Two or three projects you understand fully are usually enough. Interviewers often go deep on one, so being able to explain and change it matters more than the number.
Should a fresher React developer learn TypeScript?
It is increasingly useful and many teams use it, so learning the basics is worthwhile after your JavaScript and React foundations are solid. Typing props and state in one project is a good start.
Does Uncodemy help with React Developer interview answers?
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
Build the foundations fresher React roles need
Our React JS Training Course starts with strong JavaScript, then core React, hooks and real projects, with mock interviews to test each foundation.
Talk to a counsellor for current fees- JavaScript fundamentals
- React and hooks projects
- CSS layout practice
- Weekday & weekend batches