Skip to content

Instantly share code, notes, and snippets.

@iCodeForBananas
Created December 8, 2025 03:05
Show Gist options
  • Select an option

  • Save iCodeForBananas/3614487703579d3b74616b69b0a6ab96 to your computer and use it in GitHub Desktop.

Select an option

Save iCodeForBananas/3614487703579d3b74616b69b0a6ab96 to your computer and use it in GitHub Desktop.

1. JavaScript Fundamentals — Interview Questions

  1. What are closures, and how does JavaScript handle scope?
  2. How does the event loop work?
  3. What is the difference between the event queue and the microtask queue?
  4. How do Promises work? How does async/await simplify them?
  5. What is hoisting, and how does it apply to variables and functions?
  6. How does the this keyword behave in different contexts?
  7. How does prototypal inheritance work in JavaScript?
  8. What is event delegation, and why is it beneficial?
  9. What is the difference between debouncing and throttling?
  10. How does browser storage work (localStorage vs sessionStorage)?
  11. What are REST API methods, and how do they differ?
  12. What is OAuth, and how does it work?
  13. How does SSO work?
  14. What are the principles of functional programming in JavaScript?
  15. What are microservices, and when would you use them?
  16. What is the call stack?
  17. What is the event queue?
  18. What is the microtask queue?
  19. What is the event loop, and why do microtasks run first?
  20. How do setTimeout and setInterval actually get executed?
  21. How does the browser interpret TypeScript?
  22. What is the difference between method overloading and overriding in JavaScript?
  23. What is the Virtual DOM?
  24. How does the Virtual DOM differ from the real DOM?
  25. How do you prevent CLS (Cumulative Layout Shift)?
  26. How would you debug a production issue with no logs?
  27. What is Webpack, and why is it used?
  28. How do you measure web application performance?
  29. How does tabIndex affect keyboard navigation?

2. JavaScript Coding Tasks — Interview Questions

  1. How would you implement a polyfill for Promise.all?
  2. How would you implement a polyfill for Promise.any?
  3. How would you implement Array.prototype.reduce?
  4. How would you implement a flatten function like Lodash.flatten?
  5. How do you implement automatic retry logic for Promises?
  6. How would you throttle Promises by batching them?
  7. How do you implement a debounce function?
  8. How do you implement a throttle function?
  9. How would you run N async callback-based tasks in series?
  10. What is the output of this tricky JavaScript snippet? (Provide candidate code.)
  11. When should you use an Object vs a Map?
  12. What is the difference between PATCH and PUT?

3. React Core — Interview Questions

  1. What is React, and what problem does it solve?
  2. What are the main features of React?
  3. What is the difference between class components and functional components?
  4. What is JSX, and why is it used?
  5. How does the Virtual DOM work?
  6. What is reconciliation?
  7. What is React Fiber?
  8. Why do keys matter in React, and what happens if they are unstable?
  9. What are props and state? How do they differ?
  10. What is a controlled component vs uncontrolled component?
  11. How does the Context API work?
  12. How do Redux and Zustand differ from Context?
  13. How does useState work internally?
  14. What does useEffect do, and how does cleanup work?
  15. When would you use useLayoutEffect instead of useEffect?
  16. What is the difference between useCallback and useMemo?
  17. What are common use cases for useRef?
  18. What are custom hooks, and how do you write one?
  19. What is useReducer, and when should you use it?
  20. What are the Rules of Hooks?
  21. What are React.memo and memoization strategies used for?
  22. What are fragments?
  23. What are synthetic events in React?
  24. What are Error Boundaries?
  25. What are Portals, and when do you use them?
  26. What are Higher-Order Components (HOCs)?
  27. What are render props?
  28. What is React Suspense?
  29. What is lazy loading in React?
  30. What is the difference between SSR and CSR?
  31. How does hydration work in Next.js?
  32. What are React’s concurrent features?
  33. What is micro-frontend architecture?
  34. What is Module Federation?
  35. What causes memory leaks in React, and how do you detect them?
  36. How do you measure performance in React applications?
  37. How do you structure reusable UI components?
  38. How does React Router work?
  39. What’s the difference between BrowserRouter and HashRouter?
  40. How do you pass data between routes?
  41. How do you handle forms and validation in React?
  42. What tools do you use for testing (Jest, RTL, Cypress)?

4. React Coding Tasks — Interview Questions

  1. How would you build a simplified version of useState?
  2. How would you implement a modal using React Portals?
  3. How do you build a custom hook for increment/decrement counters?
  4. How do you send data from child to parent using callbacks?
  5. How do you send data from child to parent using useRef?
  6. How would you build a basic login form with validation?
  7. How would you build a todo list with add, update, delete?
  8. How would you implement prototypal inheritance manually?

5. Performance & Optimization — Interview Questions

  1. How do you optimize a React application?
  2. How does lazy loading work, and where is it beneficial?
  3. How would you optimize a large table (10k rows)?
  4. How do you prevent unnecessary re-renders?
  5. How do you debug a slow component?
  6. How do you perform bundle optimization?
  7. What are Web Vitals, and how do you improve them?

6. Next.js — Interview Questions

  1. What is the difference between getServerSideProps and getStaticProps?
  2. How does routing work in Next.js?
  3. What are the advantages of Next.js over CRA?
  4. How does hydration work?
  5. What SSR techniques improve SEO?

7. Scenario-Based React Questions

  1. Your React app is lagging—how do you find the root cause?
  2. A prop updated but the UI didn’t—what might be happening?
  3. You have two API calls where one depends on the other—how do you handle this?
  4. Your useEffect runs twice—why?
  5. Your component unmounts before async data returns—how do you avoid errors?
  6. A list component re-renders unnecessarily—how do you fix it?
  7. How do you efficiently render 10,000+ rows?
  8. Two unrelated components need shared data—how do you design this?
  9. Your deployed app shows a blank screen—what do you check?
  10. A component breaks after navigation—how do you debug it?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment