React Coding Challenges
React, built the way real teams build it. Learn to think in components and ship interfaces that stay maintainable as they grow. You'll start with components, props, and state, then move through hooks, side effects, forms, data fetching, context, performance, and the patterns production apps are built on. Every exercise is a small piece of a real UI, so you learn not just how React works, but how to make the design decisions good frontend engineers make every day. Finish able to build, structure, and reason about React applications with confidence.
Components & Props
The building blocks of every React app. Learn to break a UI into reusable components and pass data into them with props — the foundation everything else builds on.
Greeting Card
This problem covers greeting people by name, and what to show when no name has been given.
Reusable Button
Here you build one shared button whose text and click behaviour are decided wherever it's used.
Avatar With Initials
This task deals with missing profile pictures, standing in with the person's initials instead.
Product Price Card
The focus here is showing a shopper the old price, the discounted price, and what they save.
Calculators & Derived State
In this module, you’ll learn how to avoid redundant data by using derived state - values computed from existing state instead of stored directly. You’ll also explore calculators, functions that automatically keep these values up to date whenever dependencies change.
Discount & Tax Calculator
Build a checkout calculator that takes a base price, discount % and tax %, then shows the subtotal, tax and final price, with discount applied before tax. A quick task to show you can get a calculation's order right.
Grade Average Calculator
Build a component where scores are added one at a time and the running average and letter grade update as you go. A simple task to show you can compute from a growing list and handle the edges safely.
EMI Calculator
Build a loan calculator with controls for amount, interest rate and tenure, showing the monthly instalment, total repayable and total interest as you move them. A good task to show you can drive a real formula from live inputs.
Composition & Communication
Building UI from reusable wrappers that accept children, and lifting state up so a parent owns the shared value while children stay controlled and stateless.
Library Card
Library Card is an Easy composition question that hands the candidate a library membership desk - name, card number, and tier controls with a live card preview that fills in as they type. They build one reusable field wrapper that labels and composes any control and shows an inline error, plus the two validators behind the member name and card number.
Temperature Sync
Sign up to see what this challenge asks.
Composed Profile Section
Compose a profile form from a reusable Field wrapper with all state lifted to the parent, and implement the derived isComplete check that gates the Continue button.
Forms & Inputs
Controlled inputs and the submit lifecycle: validation, per-field inline errors, blocking invalid submits, and emitting a clean payload.
Contact Form Validation
A contact form that checks what the visitor typed before it's sent, points at exactly what needs fixing, and confirms once the message is on its way.
Password Generator
Generate random passwords honoring a configurable length and character-class toggles, guaranteeing at least one character from each enabled class.
Live Text Analyzer
Compute live word count, character counts (with/without spaces), and reading time from a controlled textarea on every keystroke.
Playlist Builder
Build a validated add-song form that appends to an editable list with mm:ss parsing/formatting and a live total-duration display.
Lists & Collections
Rendering arrays and updating them immutably: add, toggle, remove, keys and stable identity, derived counts and totals, and safe empty states.
Todo Application
Implement add, toggle, delete, and a live remaining-count for a pre-built React + TypeScript todo app; the UI, wiring, and seed data are provided.
Cart Quantity Manager
Wire up a studio-gear checkout cart by implementing the pure functions that drive each line total, the order total, and quantity changes (including remove-on-zero).
Image Gallery Selection
Build the selection logic for a photography gallery viewer: show the first image by default, swap the hero when a thumbnail is clicked, and mark exactly the active thumbnail in a six-frame contact strip.
Contacts List with Async Load
Implement a custom hook that loads contacts from an API on mount and a pure filter function, so a provided Contacts panel supports async loading, live case-insensitive search, and per-row remove.
Side Effects & Data Fetching
useEffect against a backend, where correctness depends on the failure modes: debouncing input-driven requests, ignoring stale responses so an older one can't overwrite a newer, retrying transient failures with backoff, polling until a terminal status, and cleaning up timers on unmount.
Movie Finder
Build a movie search that waits until you stop typing before querying, and throws away results for a search you've already moved on from. A good task to show you can stop slow responses arriving out of order.
Travel Catalog Pagination
Build a paginated product list where the server sends one page at a time, with Prev and Next disabled at the ends. A practical task to show you can keep page state and the server in step.
Weather Forecast Load
Build a forecast loader that retries a failed request a few times with increasing gaps, then gives up cleanly with a manual retry. A good task to show you can handle flaky networks without hammering the server.
Order Status Tracker
Sign up to see what this challenge asks.
Multi-Resource Dashboard
Build two dashboard panels that load different data but share one reusable hook for loading and error handling. A rounded task to show you can spot repetition and pull it into something reusable.
Custom Hooks
Extracting stateful logic into reusable units tested on their own with renderHook. Learners rebuild useDebounce, useLocalStorage, useFetch and useForm, making real design calls about return shape, derived vs. stored values, dependencies and cleanup.
Search Suggestions Debounce Hook
Build a useDebounce hook that only reports a value once it stops changing, clearing pending timers as it goes. A quick task to show you can package timing behaviour into a clean hook.
Form Draft
Build a useLocalStorage hook so a half-finished form survives a page refresh. A simple task to show you can sync React state with browser storage safely.
Resource Loader Hook
Build a useFetch hook that refetches when its URL changes and ignores a response that arrived for the old one. A good task to show you understand where race conditions come from.
Settings Form State Hook
Bring a store's checkout form to life - track what the shopper enters, flag invalid or missing details, and let the order go through only when every field is valid.
Shopping Cart Hook
Build a working shopping cart where customers can add items, change how many they want, remove things, and see the price total update automatically.
Reducers & State Logic
useReducer for state too tangled for scattered setState calls: named actions into a pure, unit-testable reducer, plus selectors that derive filtered lists, counts and flags rather than duplicating them in state.
Task Manager
Build the logic behind a task board. The screen is ready - a list of tasks, tabs for All, Active, and Completed, and a counter for tasks left - but nothing responds yet. Make it work: add tasks, check them off, delete them, clear completed ones, and switch filters so the board always shows the right tasks and the right count.
Data Table Query Reducer
The back-office dashboard for an online store, where the team searches, sorts, and reviews orders. It's fully designed but the controls aren't wired up yet — the sidebar, search, and column sorting don't respond.
Data Grid Selection
Build the "select rows" behavior for a team members table. Tick a row to select it, use the header checkbox to select or clear everyone at once, and keep a running count of what's chosen - the kind of multi-select you see in any admin dashboard or inbox.
Form State Reducer
Bring a finished-looking sign-up form to life by writing the logic that tracks what's been typed, what's been touched, and what's invalid — so the form validates, enables its button, and resets correctly.
Forms & Validation
Forms & Validation is a graduated React path where each question hands the candidate a finished, working UI and asks only for the pure logic behind it - validation, form state, and the rules that gate submission. It builds from per-field validation and submit gating, through dynamic array state and async hooks, up to a context-and-reducer multi-step wizard that composes it all.
Validated Registration Form
Build a registration form whose validation is a pure, testable function. The form UI (fields, inline error slots, submit button) is provided and wired; the validator is missing, so nothing validates and submit is never gated.
Guest Invite List
Sign up to see what this challenge asks.
Async Username Availability
During sign-up, check a chosen handle's availability against the backend as the user types. The handle input and the status indicator are provided and wired; the debounced fetch + status logic is missing, so the indicator never changes.
Multi-Step Wizard
Build a multi-step signup wizard whose step data is shared through context and validated per step. The wizard shell, the three step screens, and the Next/Back controls are provided and wired; the context reducer, the per-step validators, and the submit aggregator are missing, so navigation never gates and data does not persist.
Context & Shared State
Context & Shared State is a graduated React path where each question hands the candidate a finished UI and asks only for the pure logic behind shared state - what lives in context, how it changes, and who re-renders. It climbs from a permission-checked auth context, through a reducer-backed notification queue and a selector-subscribed store, up to a cached resource context (mini react-query) that composes it all.
Role-Based Access Context
In a SaaS admin app, auth state and a permission check are exposed through context, but the permission helper and the login/logout transitions are unimplemented, so `can(...)` never returns the right answer and signing in or out does not change what a consumer may see.
Notification Center
The app needs a real app-wide notification center - a queue, not a single toast. The provider and the toast list UI are provided and wired, but the queue reducer and the auto-dismiss scheduling are missing, so notifications never appear, never collapse duplicates, and never time out.
Re-render-Optimized Store Context
A dashboard has many widgets reading one shared store. Today every store update re-renders every consumer. The store provider and the widgets are provided; the subscription mechanism that isolates re-renders is missing, so an unrelated update repaints the whole board.
Cached Resource Context
Build a lightweight data-cache context - a mini react-query - that fetches, caches, de-dupes in-flight requests, and invalidates by key. The provider, the consuming widgets, and the API base configuration are provided; the cache logic and the `useResource` hook are missing, so every consumer refetches and nothing is shared.
Async Patterns
Async Patterns is a graduated React path where each question hands the candidate a finished UI and asks only for the pure async logic behind it - how requests fire, settle, and update state. It builds from an optimistic like with rollback, through a guarded de-duped load-more feed and a parallel dashboard that degrades on partial failure, up to a fetch-once client-filtered dataset that derives every view from one cached set.
Optimistic Like Toggle
On a social feed, a like button should feel instant - flip the liked state and count immediately, then confirm with the server. The button and the post card are provided and wired, but the optimistic toggle + rollback logic is missing, so clicking does nothing and a failed request is never undone.
Load-More Feed
In a news reader, a "Load more" button should append the next page of articles. The list and the button are provided and wired, but the paging logic is missing, so the button does nothing, duplicates can slip in, and it never disables at the end.
Parallel Dashboard Load
An analytics dashboard needs three independent resources at once. The panels and the combined loading UI are provided and wired, but the parallel-load logic is missing, so the dashboard never resolves and one failing request would take the whole page down.
Client-Filtered Dataset
A team directory loads its full member roster once, then filters and sorts it live in memory as the user types. The header, toolbar, and results table are provided and wired, but the filter/sort logic and the fetch-once hook are missing, so the table stays empty and typing does nothing.
Performance Optimization
Performance Optimization is a graduated React path where each question hands the candidate a finished UI and asks only for the pure logic that keeps it fast - windowing, reference-preserving updates, and memoization boundaries. It builds from a virtualized transactions table, through a memo-optimized kanban board and a dashboard whose expensive aggregation recomputes only when its inputs change, up to an infinite virtualized feed over a normalized store that composes it all.
Virtualized Transactions Table
A banking screen must render 50,000 transactions smoothly. The header summary, filter bar, and scroll container are provided and wired, but the windowing + filter/sort logic is missing, so the table tries to mount every row (or nothing) and never filters or sorts.
Memo-Optimized Kanban Board
On a kanban board, interacting with one card must never re-render the whole board. The columns, cards, and the add/edit/move controls are provided and wired, but the state ops and stable handlers are missing, so editing one card either does nothing or repaints every card.
Analytics Dashboard
A metrics dashboard derives expensive aggregates (grouping, percentiles) from a large dataset. The tabs, theme toggle, and chart chrome are provided and wired, but the aggregation + its memo boundary are missing, so it either recomputes on every unrelated click or never computes.
Infinite Virtualized Feed
A social feed must stay fast while endlessly scrolling. The feed shell, the memoized post component, and the sentinel are provided and wired, but the infinite-load + windowing + normalized store are missing, so scrolling either mounts everything, refetches endlessly, or lets the same post drift out of sync across the places it appears.
About this path
This path starts with components and props and goes on to state, forms, effects, custom hooks, reducers, context and performance. You should be comfortable with HTML, CSS and modern JavaScript before you start. No earlier React experience is needed. Later challenges include a virtualized transactions table, a memo-optimized kanban board and an infinite feed.
From the blog
4Frequently asked questions
4>What will I practice in this path?
12 modules: Components & Props, Calculators & Derived State, Composition & Communication, Forms & Inputs, Lists & Collections, Side Effects & Data Fetching, Custom Hooks, Reducers & State Logic, Forms & Validation, Context & Shared State, Async Patterns and Performance Optimization.
>How many challenges are there, and how hard are they?
48 challenges: 19 easy, 25 medium and 4 hard.
>What does this path run on?
Challenges run on React 19.
>Do I need to install anything?
No. Every challenge runs in a browser-based IDE with everything already set up, and your code is graded automatically against a test suite.
