# 🚀 Top 30 ReactJS Machine Coding Interview Questions (Difficulty-Wise )

**If you're preparing for a frontend developer role, especially one that emphasizes ReactJS, this post is your go-to roadmap.**  
These are *real-world machine coding problems* frequently asked in interviews at companies like **Swiggy, Razorpay, Zoho, BrowserStack, Paytm, Freshworks**, and dozens of startups.

# 🧠 What Are Machine Coding Rounds?

Machine coding rounds are hands-on interviews where you’re asked to **build a working feature or mini-application using React** — no theory, no multiple choice questions, just pure code.

The interviewer evaluates:

* Code readability and modularity
    
* Correct state management
    
* UI responsiveness
    
* Logical problem solving
    
* Handling of edge cases and UX details
    

## Level 1 – Beginner (Easy)

### Focus: JSX, props, state, and event handling

| S. No. | Problem | Key Concepts |
| --- | --- | --- |
| 1 | **Counter App** | `useState`, event handling |
| 2 | **Todo List App** | Add/delete/update items using array state |
| 3 | **Light/Dark Theme Toggle** | CSS toggle, `localStorage` persistence |
| 4 | **Show/Hide Password** | Input type toggle |
| 5 | **Like / Unlike Button** | Conditional rendering |
| 6 | **Temperature Converter (°C ⇄ °F)** | Controlled inputs |
| 7 | **Form Validation (Login / Signup)** | Validation + inline errors |
| 8 | **Tabs Component** | Active tab rendering |
| 9 | **Accordion / FAQ Section** | Expand-collapse with single/multiple open states |
| 10 | **Stopwatch / Timer** | `setInterval`, cleanup with `useEffect` |

## Level 2 – Intermediate (Medium)

### Focus: API calls, lifting state, reusable components

| S. No. | Problem | Key Concepts |
| --- | --- | --- |
| 11 | **Fetch and Display Data (Users/Posts)** | `fetch()`, async/await, loading states |
| 12 | **Search Filter (Static Data)** | Controlled input, filtering arrays |
| 13 | **Debounced Search (API)** | `setTimeout`, cleanup, API requests |
| 14 | **Pagination Component** | Derived state, navigation |
| 15 | **Modal / Popup Component** | Overlay, close on outside click |
| 16 | **Star Rating Component** | Hover + click handling |
| 17 | **Progress Bar (Animated)** | CSS transitions, dynamic width |
| 18 | **Responsive Navbar** | Conditional rendering for mobile |
| 19 | **Multi-Step Form / Wizard** | Step management, data persistence |
| 20 | **Drag-and-Drop List** | React DnD or HTML5 Drag API |

## Level 3 – Advanced (Hard)

### Focus: Context, custom hooks, performance optimization

| S. No. | Problem | Key Concepts |
| --- | --- | --- |
| 21 | **Dynamic Form Builder** | Render form from JSON schema |
| 22 | **Shopping Cart UI** | Context API, derived totals |
| 23 | **Infinite Scroll Feed** | Scroll detection, lazy loading |
| 24 | **Typeahead / Autocomplete** | Debounced suggestions |
| 25 | **Kanban Board (Trello Clone)** | Multiple columns, drag-drop |
| 26 | **Weather App (API Integration)** | Fetch + icons + error handling |
| 27 | **File Upload with Preview** | FileReader API |
| 28 | **Expense Tracker Dashboard** | Charts, persistent state |
| 29 | **Custom Hook – useLocalStorage()** | Reusable state logic |
| 30 | **Theme Context + Global State** | Context + provider-based theming |

### ⚙️ What Interviewers Evaluate

| Area | What They Look For |
| --- | --- |
| **Code Quality** | Modular, reusable, readable code |
| **State Management** | Clean use of `useState`, `useEffect`, `Context` |
| **UI/UX** | Responsive design, accessibility |
| **Problem Solving** | Logical, step-by-step implementation |
| **Best Practices** | Naming, folder structure, and code comments |

## 💪 Bonus Challenges (for extra learning)

* **Weather Dashboard** (API + charts)
    
* **Spotify Clone UI** (mock data + interactions)
    
* **Quiz App** (state-driven navigation)
    
* **File Upload with Progress Bar**
    
* **E-commerce Cart with Context API**
    

### 🎯 Final Thoughts

These problems cover 90% of what you’ll face in **ReactJS machine coding rounds** for frontend roles.  
Don’t just memorize — **build them**, **refactor**, and **deploy** on vercel or Netlify.
