Controlled Input Component

Easy
6 views 25 Jan 2026
Build a controlled text input that shows the typed value below....

Layout Component With Props

Medium
6 views 25 Jan 2026
Create a Layout component that accepts header and footer content as props....

Style Props Merging

Medium
6 views 25 Jan 2026
Create a Box component that merges default styles with a style prop....

Disable Button During Work

Medium
6 views 25 Jan 2026
Create a button that becomes disabled while a fake async task is running....

Reusable Alert Component

Easy
6 views 25 Jan 2026
Create an Alert component that supports success and error styles....

Keyed Fragment List

Hard
6 views 25 Jan 2026
Render a list where each item outputs two lines using a keyed Fragment....

Simple Portal Toast

Hard
7 views 25 Jan 2026
Create a Toast that renders at the end of body using createPortal....

Compound Input With Label

Medium
5 views 25 Jan 2026
Create a Field component that renders label + input and accepts id/name props....

Small Router Without Library

Hard
6 views 25 Jan 2026
Create a tiny router that switches pages using state and buttons....

Prop Drilling Cleanup

Hard
7 views 25 Jan 2026
Refactor a deep tree to pass only the props needed (no extra props)....

Conditional ClassName

Medium
6 views 25 Jan 2026
Add className based on prop without messy string building....

Render Only When Needed

Easy
6 views 25 Jan 2026
Create a component that returns null when there is nothing to show....

Small Component API Design

Medium
6 views 25 Jan 2026
Design a Notice component that accepts tone, title, and children content....

Keyboard Friendly Menu Button

Medium
6 views 25 Jan 2026
Create a menu button that toggles a list and supports keyboard focus style....

Reusable Spacer Component

Easy
7 views 25 Jan 2026
Create a Spacer component to add vertical space without magic numbers everywhere....

Split Layout Using Props

Hard
7 views 25 Jan 2026
Create a TwoColumn layout component with left and right props....

Safe HTML Rendering

Hard
8 views 25 Jan 2026
Render user text safely (do not use dangerouslySetInnerHTML)....

Component With Optional Footer

Medium
8 views 25 Jan 2026
Create a Card component that renders an optional footer when prop is provided....

Prevent Unnecessary Re-render

Hard
5 views 25 Jan 2026
Move inline objects outside render to avoid new references each render....

Tooltip On Hover And Focus

Medium
7 views 25 Jan 2026
Build a tooltip that opens on hover and keyboard focus....

Stepper Progress Indicator

Medium
6 views 25 Jan 2026
Create a stepper UI that shows current step and completed steps....

Counter With Step Buttons

Easy
7 views 25 Jan 2026
Build a counter with +1, -1, +5, reset buttons....

Toggle Multiple Filters

Medium
6 views 25 Jan 2026
Make three filter chips (Easy, Medium, Hard) that can be toggled....

Basic Shopping Cart State

Medium
6 views 25 Jan 2026
Create a tiny cart that adds items and shows total quantity....

Effect Cleanup With Timer

Medium
6 views 25 Jan 2026
Start a timer in useEffect and clean it up on unmount....

Fetch Data With Loading And Error

Hard
6 views 25 Jan 2026
Fetch a fake list and show loading/error/success UI....

Click Outside To Close

Hard
6 views 25 Jan 2026
Close a dropdown when clicking outside of it using refs and effects....

Email Form With Simple Validation

Medium
8 views 25 Jan 2026
Create an email form that shows an error if input is empty or invalid....

Password Strength Hint

Medium
6 views 25 Jan 2026
Show a live password strength hint while user types....

Todo List Add And Remove

Medium
4 views 25 Jan 2026
Create a todo list where you can add items and remove them....

useReducer Counter With History

Hard
6 views 25 Jan 2026
Use useReducer to manage count and keep a small action history....

Theme Toggle With Context

Hard
7 views 25 Jan 2026
Create a light/dark theme toggle using React context....

Debounced Search Input

Hard
6 views 25 Jan 2026
Debounce a search input so it updates results after user stops typing....

usePrevious Value Hook

Medium
7 views 25 Jan 2026
Create a small hook that returns the previous value of a prop/state....

useLocalStorage State

Hard
6 views 25 Jan 2026
Create a hook that syncs a string value to localStorage....

Abort Fetch On Unmount

Hard
8 views 25 Jan 2026
Fetch data and cancel the request using AbortController on cleanup....

Dynamic Input Fields

Hard
7 views 25 Jan 2026
Create a form where user can add multiple links (add/remove rows)....

Checkbox Group With Summary

Medium
5 views 25 Jan 2026
Create a checkbox group and show a summary of selected values....

File Input Preview

Hard
7 views 25 Jan 2026
Create a file input that shows a preview of selected image....

Inline Style Objects Move Outside

Medium
5 views 25 Jan 2026
Refactor a component to move style objects outside and keep render clean....

useMemo For Filtered List

Hard
8 views 25 Jan 2026
Use useMemo to avoid filtering a list on every render unnecessarily....

useCallback Stable Handler

Hard
6 views 25 Jan 2026
Use useCallback to keep a stable function reference for a memoized child....

Optimistic Like Button

Hard
4 views 25 Jan 2026
Create a like button that updates UI immediately and then confirms....

Cart Item Quantity Controls

Medium
7 views 25 Jan 2026
Build a cart where you can increase/decrease quantity per item....

Language Switcher With Context

Hard
6 views 25 Jan 2026
Create a language switcher using context and show translated text....

Pagination With useReducer

Hard
5 views 25 Jan 2026
Manage pagination state (page, pageSize) using a reducer....

Document Title From Select

Medium
5 views 25 Jan 2026
Update document.title when a piece of state changes....

Window Width Listener

Medium
6 views 25 Jan 2026
Show window width and update it on resize using an effect....

Custom useInterval Hook

Hard
5 views 25 Jan 2026
Create a useInterval hook and use it to increment a number....

Enter Key Shortcut

Hard
6 views 25 Jan 2026
Handle Enter key press to submit a message using document keydown....

Confirm Password Basic

Hard
6 views 25 Jan 2026
Create a sign-up form that checks password and confirm password match....

Radio Plan Selector

Medium
6 views 25 Jan 2026
Create a radio group to select a plan and show selected plan....

Validate On Blur

Medium
6 views 25 Jan 2026
Show an error only after user leaves the input (onBlur)....

Reset Form Button

Easy
6 views 25 Jan 2026
Create a form with a reset button that clears all fields....

Memoized Row Component

Hard
6 views 25 Jan 2026
Create a table where each row is memoized to avoid extra re-renders....

Lazy Loaded Section

Hard
5 views 25 Jan 2026
Use React.lazy and Suspense to load a heavy section....

Stable Keys Not Index

Easy
6 views 25 Jan 2026
Render a list with stable ids and avoid using index as key....

Star Rating State

Medium
6 views 25 Jan 2026
Build a 5-star rating component where user can select a rating....

Multi Step Wizard State

Medium
4 views 25 Jan 2026
Create a 3-step wizard and let user go next/back....

Undo Last Added Item

Hard
5 views 25 Jan 2026
Add items and support undo for the last add action....

Persist Toggle Setting

Hard
6 views 25 Jan 2026
Save a boolean setting in localStorage and restore it on load....

useMediaQuery Hook

Hard
6 views 25 Jan 2026
Create a hook that returns true/false based on a media query....

Scroll Position Tracker

Medium
6 views 25 Jan 2026
Track scrollY and show it on the screen....

Custom useFetch Hook

Hard
9 views 25 Jan 2026
Create a useFetch hook that returns loading/error/data....

Effect Dependency Fix

Hard
6 views 25 Jan 2026
Fix an effect that uses state by including dependencies correctly....

Dependent Select Inputs

Hard
4 views 25 Jan 2026
Create two selects where second options depend on first selection....

Number Input With Limits

Medium
7 views 25 Jan 2026
Create a number input with min/max and show an error message....

Textarea Character Limit

Easy
5 views 25 Jan 2026
Create a textarea with a live character counter and max limit....

Error Summary On Submit

Hard
5 views 25 Jan 2026
On submit, show a small error summary list at top....

Split State By Concern

Medium
5 views 25 Jan 2026
Split a component state into two smaller states to avoid confusion....

Keep Mutable Value In Ref

Hard
5 views 25 Jan 2026
Use useRef to store a mutable value without re-rendering....

Memoize Derived Stats

Hard
5 views 25 Jan 2026
Compute derived stats from a list and memoize the result....

Toast Queue Reducer

Hard
6 views 25 Jan 2026
Build a toast system where new messages appear and auto-dismiss....

Cart Quantities Reducer

Hard
6 views 25 Jan 2026
Build a small cart where you can add items and change quantities....

Select All Checkbox

Medium
7 views 25 Jan 2026
Build a list of checkboxes with a Select All control....

Accordion Open Set

Medium
5 views 25 Jan 2026
Build an accordion where multiple sections can be open at once....

Optimistic Like Toggle

Hard
4 views 25 Jan 2026
Build a Like button that updates instantly, but rolls back on failure....

Request Status State

Hard
5 views 25 Jan 2026
Build a card that loads data and shows idle/loading/success/error states....

Theme Context Toggle

Hard
6 views 25 Jan 2026
Create a ThemeProvider that toggles light/dark and updates styles....

Modal Stack Manager

Hard
7 views 25 Jan 2026
Open multiple modals and close the top one first....

Inline Edit List Item

Hard
6 views 25 Jan 2026
Render a list of titles and let user edit one item at a time....

Move Item Up And Down

Medium
5 views 25 Jan 2026
Render a list and add Up/Down buttons to reorder items....

Sync Page With URL

Hard
4 views 25 Jan 2026
Keep current page in state and sync it with the URL query param....

Session Draft Saver

Hard
5 views 25 Jan 2026
Save a text draft in sessionStorage and restore it when you refresh....

Tag Input With Remove

Medium
6 views 25 Jan 2026
Build a tag input where user can add tags and remove them....

useDebouncedValue Hook

Hard
7 views 25 Jan 2026
Create a hook that debounces a value and updates after a delay....

useInterval Hook

Hard
7 views 25 Jan 2026
Create a useInterval hook and use it to build a timer....

usePrevious Hook

Medium
6 views 25 Jan 2026
Create a hook that returns the previous value and show it for a counter....

useOnClickOutside Hook

Hard
8 views 25 Jan 2026
Close a dropdown when user clicks outside of it....

useDocumentTitle With Cleanup

Medium
6 views 25 Jan 2026
Create a hook that sets document.title and resets it on unmount....

useEventListener Hook

Hard
7 views 25 Jan 2026
Create a hook to attach an event listener safely....

Abortable Fetch Effect

Hard
6 views 25 Jan 2026
Fetch data in an effect and cancel when the component unmounts....

useLocalStorage Hook

Hard
4 views 25 Jan 2026
Create a useLocalStorage hook and use it for a text setting....

useCopyToClipboard Hook

Hard
9 views 25 Jan 2026
Create a hook to copy text to clipboard and show success state....

Measure Width With LayoutEffect

Hard
7 views 25 Jan 2026
Measure an element width after layout and show it on the UI....

useOnlineStatus Hook

Medium
5 views 25 Jan 2026
Create a hook that tracks online/offline status....

Hash Route Listener

Hard
7 views 25 Jan 2026
Listen to hash changes and show the active section name....

Focus Input On Mount

Medium
5 views 25 Jan 2026
Focus an input when the component mounts....

Close On Escape

Hard
6 views 25 Jan 2026
Close a modal-like box when user presses Escape....

Auto Save With Cleanup

Hard
6 views 25 Jan 2026
Auto-save text after user stops typing and cancel the pending save on change....

useId For Form Labels

Medium
8 views 25 Jan 2026
Build a small form that uses useId to link label and input....

Login Form Validation

Hard
5 views 25 Jan 2026
Build a login form with email/password validation and show errors....

Confirm Password With Min Length

Hard
7 views 25 Jan 2026
Build a signup form that checks confirm password matches....

Terms Must Be Accepted

Medium
5 views 25 Jan 2026
Build a form that requires accepting terms before submit....

Radio Group Required

Medium
6 views 25 Jan 2026
Build a radio group and show an error when user submits without selection....

Checkbox Group Minimum

Hard
7 views 25 Jan 2026
Build a checkbox group where user must pick at least one option....

Dynamic Skills Fields

Hard
7 views 25 Jan 2026
Build a form where user can add/remove skill input fields....

OTP Input Auto Advance

Hard
6 views 25 Jan 2026
Build a 4-digit OTP input that moves focus to next box....

Async Username Check

Hard
6 views 25 Jan 2026
Validate a username asynchronously and show loading/available states....

File Upload Preview Validate

Hard
7 views 25 Jan 2026
Build an image upload input that previews the image and validates size....

Date Range Validation

Hard
6 views 25 Jan 2026
Build a date range form and validate end date is not before start date....

Phone Number Formatter

Hard
6 views 25 Jan 2026
Build a phone input that keeps only digits and formats as you type....

Accessible Error Messages

Medium
5 views 25 Jan 2026
Build a field that links error text using aria-describedby....

Disable Submit Until Valid

Hard
7 views 25 Jan 2026
Build a form that disables submit until all validations pass....

Form Reset To Defaults

Medium
6 views 25 Jan 2026
Build a form with Reset button that restores default values....

Custom Select Placeholder

Medium
6 views 25 Jan 2026
Build a select with a placeholder option and require a real choice....

Inline Validation On Blur

Medium
6 views 25 Jan 2026
Validate a field only after it was touched (on blur)....

Simple Math Captcha

Hard
5 views 25 Jan 2026
Build a simple math captcha and block submit until answer is correct....

useDeferredValue Search

Hard
6 views 25 Jan 2026
Use useDeferredValue to keep typing smooth during heavy filtering....

useTransition Filter

Hard
8 views 25 Jan 2026
Use useTransition to show pending state while updating an expensive list....

Windowed List Virtualization

Hard
6 views 25 Jan 2026
Render 10k+ items smoothly by only rendering visible rows (manual virtualization)....

Debounced Search With Hook

Medium
7 views 25 Jan 2026
Debounce user typing so filtering runs less often and feels smoother....

Throttled Scroll Progress

Hard
8 views 25 Jan 2026
Update scroll progress smoothly without setting state on every scroll event....

Memoize Context Value

Hard
7 views 25 Jan 2026
Avoid re-rendering consumers by memoizing the context value object....

useSyncExternalStore Mini Store

Hard
6 views 25 Jan 2026
Subscribe to an external store without tearing using useSyncExternalStore....

React.memo With Custom Compare

Hard
6 views 25 Jan 2026
Memoize rows so only the selected row re-renders when selection changes....

Stable Object Props With useMemo

Medium
5 views 25 Jan 2026
Pass stable object props to memoized child so it doesn’t re-render....

Memoize Expensive Computation

Medium
5 views 25 Jan 2026
Calculate heavy derived data once per input change using useMemo....

Functional Updates For Batching

Easy
5 views 25 Jan 2026
Update state multiple times safely using functional setState....

Intl Formatter Outside Component

Easy
7 views 25 Jan 2026
Create expensive Intl formatter once, not every render....

Defer Heavy Work With Idle Callback

Hard
6 views 25 Jan 2026
Run heavy work when the browser is idle so UI stays responsive....

Preload Lazy Panel On Hover

Hard
5 views 25 Jan 2026
Preload a lazy component when user hovers so it opens instantly....

Render Count Tracker

Medium
6 views 25 Jan 2026
Track how many times a component re-rendered and show it on screen....

Memoized Lookup Map

Medium
6 views 25 Jan 2026
Build a lookup Map once and use it for fast access during rendering....

Controlled Input In Memo Child

Hard
6 views 25 Jan 2026
Keep a fast input responsive by isolating re-renders in a memo child....

Sorting With useMemo

Medium
7 views 25 Jan 2026
Sort a list only when sort options change, not on every render....

Simple Header Component

Easy
6 views 25 Jan 2026
Build a header for meetcode with a brand on the left and links on the right....

Reusable Button Variants

Easy
6 views 25 Jan 2026
Create a Button component with variants: primary and ghost....

Card With Children Slot

Easy
5 views 25 Jan 2026
Make a Card component that accepts children and keeps the same look everywhere....

Avatar With Fallback

Medium
7 views 25 Jan 2026
Create an Avatar that shows an image, but falls back to initials if image is missing....

Conditional Banner

Easy
6 views 25 Jan 2026
Show a success banner only when a boolean prop is true....

List Rendering With Stable Keys

Medium
7 views 25 Jan 2026
Render a topic list and use stable keys instead of index....

Empty State Component

Medium
7 views 25 Jan 2026
Create an EmptyState component that shows a title, message, and an action button....

Badge Component With Color

Easy
7 views 25 Jan 2026
Make a Badge component that supports colors: green, gray, red....

Icon Only Button Accessibility

Medium
6 views 25 Jan 2026
Create an icon-only button that is accessible using aria-label....

Tabs With Local State

Medium
7 views 25 Jan 2026
Build basic tabs with buttons and show the active panel....

Render Props Mini

Hard
6 views 25 Jan 2026
Create a component that provides mouse position using a render function prop....

Forward Ref Input Focus

Hard
7 views 25 Jan 2026
Build an input component that exposes focus() using forwardRef....

Simple Modal Without Libraries

Medium
6 views 25 Jan 2026
Create a basic modal UI using conditional rendering and a backdrop....

Skeleton Loader Block

Easy
5 views 25 Jan 2026
Create a skeleton block component to show loading UI....

Breadcrumb Component

Medium
7 views 25 Jan 2026
Build a breadcrumb component like Home > Topics > React....

Pagination Buttons

Medium
7 views 25 Jan 2026
Create a pagination component with Prev/Next and current page text....

Table Row Component

Medium
7 views 25 Jan 2026
Create a small table component that renders rows from data....

Toggle Section Component

Hard
7 views 25 Jan 2026
Build a collapsible section using details/summary style but with React state....

Prop Validation Without Libraries

Easy
6 views 25 Jan 2026
Create a component that safely handles missing props using defaults....

Split Big Component

Medium
5 views 25 Jan 2026
Refactor by splitting a ProfileCard into Avatar and Details components....

Compound Tabs Components

Hard
6 views 25 Jan 2026
Build simple compound tabs: Tabs, Tabs.List, Tabs.Panel....

Class Component Counter

Medium
7 views 25 Jan 2026
Create a small counter using a class component (for practice)....

Memoized Presentational Component

Hard
5 views 25 Jan 2026
Create a presentational component and wrap it with React.memo....

Error Boundary Component

Hard
5 views 25 Jan 2026
Create an ErrorBoundary that catches render errors and shows a fallback UI....