Frontend Interview Preparation Guide
Frontend Interview Preparation Guide
1. HTML & CSS Basics
- Semantic HTML: Using tags with meaning (e.g., <header>, <article>, <footer>).
- CSS Specificity: Inline > ID > Class > Element selector.
- Flexbox vs Grid: Flexbox for 1D layouts, Grid for 2D layouts.
2. JavaScript Core
- Event Loop: JS is single-threaded, uses call stack + callback queue + microtask queue to handle
async tasks.
- Hoisting: Variables (var) and functions are hoisted to top of scope.
- Closures: Functions that remember their scope even after execution context is gone.
- Promises & Async/Await: Handling asynchronous code with better readability.
3. React
- Virtual DOM: React's diffing algorithm updates only changed elements.
- Props vs State: Props are immutable, State is mutable.
- Hooks: useState, useEffect, useRef, useMemo, useCallback.
- Reconciliation: How React updates the UI efficiently.
4. Performance Optimization
- Code Splitting with React.lazy & Suspense.
- Memoization to avoid re-renders.
- Debouncing & Throttling for input and scroll events.
5. Testing
- Unit Testing with Jest + React Testing Library.
- Mocking API calls.
6. SEO in React
- Server-Side Rendering (Next.js).
- Metadata handling with <Head>.
7. Misc
- Responsive Design: Mobile-first approach, media queries.
- Accessibility: ARIA labels, keyboard navigation.