Skip to content

React Interview 2

๐Ÿ’ป JavaScript โ€” Core Concepts & Output-Based Questions

โ€ข var vs let vs const (with scope)
โ€ข Hoisting & how it works internally
โ€ข Temporal Dead Zone (TDZ)
โ€ข == vs ===
โ€ข Closures & lexical scope retention
โ€ข Callback hell โ†’ Promises โ†’ async/await
โ€ข Event loop & handling async tasks
โ€ข Sync vs async execution
โ€ข Output-based puzzles on closures, TDZ, shadowing, hoisting

โ€ข Form handling & efficient state management
โ€ข API integration + loading/error handling
โ€ข Why fetch calls are placed inside useEffect
โ€ข Hooks: useState, useEffect, useMemo, useCallback
โ€ข Context API vs Redux
โ€ข Prop drilling & solutions
โ€ข React state management strategies
โ€ข React Router: relative vs absolute paths
โ€ข Virtual DOM & reconciliation
โ€ข Performance optimisations
โ€ข Reducing a 5-second homepage load
โ€ข Importance of keys in lists
โ€ข React lifecycle
โ€ข Avoiding unnecessary re-renders
โ€ข Handling API errors & retry logic

๐Ÿงฉ Git โ€” Practical, Production-Level Scenarios


another interview

1๏ธโƒฃ How does the Virtual DOM actually improve performance?
2๏ธโƒฃ When should you use useCallback and useMemo?
3๏ธโƒฃ Can you explain prop drilling with a real example?
4๏ธโƒฃ Whatโ€™s the difference between controlled vs uncontrolled components?
5๏ธโƒฃ How does React.memo() prevent unnecessary renders?
6๏ธโƒฃ What happens when you call setState internally?
7๏ธโƒฃ How do you optimize React components in large projects?


๐——๐—ฎ๐˜† ๐Ÿญ-๐Ÿฎ: ๐—๐—ฎ๐˜ƒ๐—ฎ๐—ฆ๐—ฐ๐—ฟ๐—ถ๐—ฝ๐˜ (๐Ÿฑ ๐—ฐ๐—ผ๐—ป๐—ฐ๐—ฒ๐—ฝ๐˜๐˜€) ย  โ€ข Closures (stale closures in React) ย  โ€ข Promises & async (race conditions, error handling) ย  โ€ข Event loop (execution order) ย  โ€ข This keyword (binding rules) ย  โ€ข Debouncing/Throttling (implement from scratch)

๐——๐—ฎ๐˜† ๐Ÿฏ-๐Ÿฐ: ๐—ฅ๐—ฒ๐—ฎ๐—ฐ๐˜ (๐Ÿฑ ๐—ฝ๐—ฎ๐˜๐˜๐—ฒ๐—ฟ๐—ป๐˜€) ย  โ€ข When components re-render (4 triggers) ย  โ€ข useEffect (dependencies, cleanup, common bugs) ย  โ€ข useState (functional updates, stale closures) ย  โ€ข useCallback vs useMemo (when to use) ย  โ€ข Custom hooks (useDebounce, useFetch)

๐——๐—ฎ๐˜† ๐Ÿฑ-๐Ÿฒ: ๐— ๐—ฎ๐—ฐ๐—ต๐—ถ๐—ป๐—ฒ ๐—–๐—ผ๐—ฑ๐—ถ๐—ป๐—ด (๐Ÿฑ ๐—ฐ๐—ผ๐—บ๐—ฝ๐—ผ๐—ป๐—ฒ๐—ป๐˜๐˜€) Build each in 45 minutes: ย  โ€ข Todo list (CRUD + localStorage) ย  โ€ข Autocomplete (debouncing + keyboard nav) ย  โ€ข Modal (accessibility + focus trap) ย  โ€ข Tabs (state management + keyboard) ย  โ€ข Infinite scroll (Intersection Observer)

๐——๐—ฎ๐˜† ๐Ÿณ โ€” ๐— ๐—ผ๐—ฐ๐—ธ ๐—ถ๐—ป๐˜๐—ฒ๐—ฟ๐˜ƒ๐—ถ๐—ฒ๐˜„ โ€ข Morning โ€” review weak spots โ€ข Afternoon โ€” timed build (45 min) โ€ข Evening โ€” mental prep & rest


Next.js

โœ… I realized that if you know React well, Next.js is not a big jump.
All you need is clarity on these core concepts:
โš™๏ธ SSR (Server-Side Rendering) vs CSR (Client-Side Rendering) vs Server Side Rendering When do you prefer CSR over SSR

File-based Routing
๐Ÿ“ฆ API Routes in Next.js
๐Ÿง  getServerSideProps, getStaticProps, and getStaticPaths
โšก App Router (app directory) and server components


two sum js react-interview-prep consulting-firm-interview-prep chess-tournament-msg cyber-attacks client-product-grooming initial-client-meet startup-interview-r0 mail

On this page