Skip to content

React Interview Questions and Answers for Freshers (2026)

The React interview questions actually asked in India - core concepts, hooks deep-dive, live coding tasks and the traps that filter out most candidates.

4 min read
3D illustration of a laptop with component blocks and an atom shaped prop

React interviews in India follow a predictable pattern: fundamentals first, hooks deep-dive, then a live coding task. If you are preparing for a frontend role, these react interview questions cover what actually gets asked - from "what is JSX" to the useEffect dependency traps that filter out most candidates. The answers are short on purpose: in the room, a clear two-minute answer beats a rambling ten-minute one.

Core React concepts every interviewer starts with

What is JSX? A syntax extension that lets you write HTML-like markup inside JavaScript. Browsers cannot read it - Babel compiles it to React.createElement calls, which return plain objects describing the UI.

What is the virtual DOM? A lightweight copy of the real DOM kept in memory. React diffs the new virtual DOM against the previous one and updates only what changed in the real DOM, which is why React apps avoid expensive full-page re-renders.

What is the difference between state and props? Props are inputs passed from a parent and are read-only inside the component. State is data the component owns and changes over time; updating it with the setter re-renders the component.

What are keys in lists and why do they matter? Keys help React identify which list items changed, moved or were removed. Using array indexes as keys breaks when items reorder, so use a stable id from your data.

Hooks: where most interviews are won or lost

Explain useState. It declares a state variable and its setter. The setter does not mutate the old value - it replaces it and schedules a re-render. Updates can be batched, so never read state right after setting it.

Explain useEffect and its dependency array. useEffect runs side effects after render. An empty array runs once on mount; dependencies re-run it when they change; no array runs after every render. The most common bug interviewers probe: a missing dependency that causes stale data, and an object or inline function in the array that causes infinite re-renders.

useMemo vs useCallback? useMemo caches a computed value between renders; useCallback caches a function reference. Both exist to skip unnecessary recomputation or re-renders of children - using them everywhere is a red flag, not a best practice.

What is useRef used for? Two things: holding a DOM node (focus an input, measure an element) and keeping a mutable value that survives renders without causing one, like a timer id or previous value.

Questions that separate juniors from mid-levels

QuestionWhat a strong answer includes
Why did React remove the need for class components?Hooks solved logic reuse and lifecycle fragmentation; mention render props and HOCs as the older patterns
What causes unnecessary re-renders and how do you fix them?New object/array props each render, missing memoization; fix with useMemo, useCallback, React.memo, lifting state down
Controlled vs uncontrolled components?Controlled: form value lives in state. Uncontrolled: the DOM holds it, read via ref. Controlled is the default recommendation
How does context compare to Redux?Context is a delivery mechanism, not a state manager; fine for low-frequency global values, not for high-frequency updates
What is lifting state up?Moving shared state to the closest common parent so siblings stay in sync through props

The live coding task: what to expect

Indian service companies and startups alike now include a 30-60 minute task: a counter with step controls, a todo list, a search filter over an API, or a debounced input. What they grade: does it work, did you handle loading and error states, did you split components sensibly, and did you explain your thinking while coding. Practice by building small things without tutorials - the JavaScript interview questions guide covers the language questions that come up in the same round.

Questions you should ask the interviewer

Which React version and state library the team uses, how they test components, and how code review works. These signal you think about working in a codebase, not just passing the interview. For the broader prep plan, the operating system interview questions and DBMS interview questions guides cover the other technical rounds service companies pair with the frontend one.

Frequently asked questions

Is React enough to get a frontend job in India?

React plus solid JavaScript gets you shortlisted almost everywhere; TypeScript is increasingly expected at product companies. What you cannot skip: plain JavaScript fundamentals, because the first round usually tests them without React.

Should I learn class components in 2026?

Only enough to read old code. Know what componentDidMount and this.state look like, but write everything with hooks. Interviewers asking class questions are testing whether you understand lifecycles, not syntax.

How deep do Next.js questions go in React interviews?

If the job posting mentions Next.js, expect SSR vs SSG vs CSR, file-based routing and data fetching. If it does not, one line - "React is the library, Next.js is the framework around it" - is enough.

What is the most common mistake in the coding round?

Writing code silently for 20 minutes and then demoing something broken. Talk while you build, state assumptions, and get a minimal version working before adding polish.

Found this useful? Send it on.

WhatsAppLinkedIn

Keep reading