PlacementPrep IndiaPowered by AcePrep
Frontend & WebBeginner • Intermediate • Advanced

React.js Mock Interview

React is the single most common frontend framework listed on Indian student resumes. Recruiters quickly separate candidates who built tutorials from those who understand rendering lifecycles, hook rules, and performance trade-offs.

Frequently Asked By:FlipkartSwiggyAtlassianRazorpayGrowwZohoStartups

3-Level React Placement Syllabus

Beginner Tier
  • JSX, Props vs State & One-Way Data Flow
  • Keys in Lists & Reconciliation
  • Controlled vs Uncontrolled Inputs
  • useState & Basic useEffect
Intermediate Tier
  • Stale Closures & Cleanup Functions
  • useMemo, useCallback & React.memo Trade-offs
  • Context API vs Zustand/Redux
  • Custom Hooks & Error Boundaries
Advanced Tier
  • Concurrent Rendering & useTransition
  • React Server Components vs Client Components
  • Preventing Re-render Cascades
  • Browser API Integration (Web Speech / Media)
INTERACTIVE BROWSER DEMO • ZERO INSTALL

Try a Spoken or Typed Mock Interview Right Now

ReactBeginnerQ1 / 3

“Why does React warn against using array indices as `key` props in dynamic lists, and what actual UI bugs can happen if you ignore it?”

Focus log (info only): 0 blurs • 0 pastes

High-Frequency Spoken React Questions & Rubric Criteria

Study how interviewers probe beyond definitions with adaptive follow-ups and what AcePrep's 0–10 scoring rubric checks in your spoken explanation.

QUESTION 01Beginner

Why does React warn against using array indices as `key` props in dynamic lists, and what actual UI bugs can happen if you ignore it?

Adaptive Follow-Up Probe

When IS it completely safe to use an index as a key?

What the Rubric Checks

  • • Explains how React matches Fiber nodes across renders via key
  • • Gives concrete bug: wrong input state/focus staying attached after prepend/delete
  • • Correctly states static, never-reordered lists as the safe exception

High-Scoring Answer Blueprint

React uses keys to match elements between renders. If items are inserted, deleted, or reordered, index keys shift and React reuses existing component instances for the wrong data — scrambling uncontrolled input values or animations. Index keys are only safe for static lists that never reorder or mutate.

QUESTION 02Intermediate

What is a stale closure in `useEffect` or event callbacks, and how do you fix it cleanly when integrating a browser API like SpeechRecognition?

Adaptive Follow-Up Probe

Why shouldn't you blindly suppress the exhaustive-deps ESLint rule?

What the Rubric Checks

  • • Explains JavaScript lexical capture of old render-scope state
  • • Shows functional state updates (`setState(prev => ...)`) and `useRef` sync patterns
  • • Explains cleanup function role to prevent duplicate listeners

High-Scoring Answer Blueprint

Callbacks created during an earlier render close over that render's state snapshot. For long-lived browser listeners like SpeechRecognition `onresult`, either use functional updates (`setTranscript(prev => ...)`), store mutable latest state in a `useRef`, or properly register and tear down listeners in `useEffect` cleanup.

QUESTION 03Advanced

When does wrapping everything in `useMemo` and `useCallback` actually hurt performance instead of helping?

Adaptive Follow-Up Probe

How would you systematically diagnose a sluggish React screen before adding memoization?

What the Rubric Checks

  • • Identifies memory & dependency-comparison overhead
  • • Highlights structural fixes first (colocating state, lifting content as children)
  • • Mentions React DevTools Profiler and Chrome Performance tab

High-Scoring Answer Blueprint

Every `useMemo`/`useCallback` allocates closure/array memory and runs dependency comparisons on every render. If a component is cheap to render or its child isn't memoized, memoization adds pure overhead. Always profile first with React DevTools, colocate state down to leaf components, and memoize only proven expensive computations or referentially sensitive props.

React Interview FAQs

Does this track include React 19 and Next.js concepts?

Yes. Intermediate and advanced questions cover modern React hooks, concurrent transitions, and Server vs Client component trade-offs.

Continue Practicing Related Tracks