State interview questions
Practice 137 questions on state. Each runs in a real in-browser editor with Jest tests and a worked, diagram-backed solution.
137 questions
- UI / FrameworksUI challenge4 variants
Accordion
EASYBuild an accordion component with stacked sections whose content panels expand and collapse on click.
20 minAdobe · Amazon · Google +4Practice - UI / FrameworksUI challenge4 variants
Basic Autocomplete
EASYBuild an autocomplete input that filters a static list and lets you pick a suggestion.
15 minPractice - UI / FrameworksUI challenge4 variants
Character Counter Textarea
EASYBuild a textarea with a live character counter that warns as it nears a maximum length.
15 minPractice - UI / FrameworksUI challenge4 variants
Color Swatch Picker
EASYBuild a swatch color picker where clicking a swatch selects it and previews the chosen color.
15 minPractice - UI / FrameworksUI challenge4 variants
Copy to Clipboard Button
EASYBuild a button that copies text to the clipboard and shows a transient copied confirmation.
15 minPractice - UI / FrameworksUI challenge4 variants
Countdown Timer
EASYBuild a countdown timer that ticks down from a start time and can start, pause, and reset.
15 minPractice - UI / FrameworksUI challenge4 variants
Counter
EASYBuild a counter component that increments a displayed number each time a button is clicked.
15 minAmazonPractice - UI / FrameworksUI challenge4 variants
FAQ Disclosure
EASYBuild a list of FAQ questions that each expand to reveal an answer on click.
15 minPractice - UI / FrameworksUI challenge4 variants
Like Button
EASYBuild a Like button that toggles between liked and unliked states with matching visual feedback.
15 minAmazon · Coinbase · OpenAIPractice - UI / FrameworksUI challenge4 variants
Modal Dialog
EASYBuild a reusable modal dialog component that you can open from a trigger and close with a button.
15 minAmazon · PayPal · Shopify +1Practice - UI / FrameworksUI challenge4 variants
Pagination UI
EASYBuild pagination controls with previous/next and numbered pages that report the current page.
15 minPractice - UI / FrameworksUI challenge4 variants
Password Strength Meter
EASYBuild a password field with a live strength meter that scores the input as you type.
15 minPractice - UI / FrameworksUI challenge4 variants
Progress Bar
EASYBuild a progress bar component that visualizes the percentage completion of an operation.
15 minAmazon · Dropbox · Google +3Practice - UI / FrameworksUI challenge4 variants
Progress Bars
EASYBuild a component that renders a list of progress bars which animate from empty to full as they mount.
15 minUberPractice - UI / FrameworksUI challenge4 variants
Segmented Control
EASYBuild a segmented control where clicking a segment selects it and highlights the active option.
15 minPractice - UI / FrameworksUI challenge4 variants
Toast Notification
EASYBuild a toast that appears on trigger and auto-dismisses after a few seconds, with manual close.
15 minPractice - UI / FrameworksUI challenge4 variants
Toggle Switch
EASYBuild an on/off toggle switch that flips state on click and slides its knob to reflect it.
15 minPractice - UI / FrameworksUI challenge4 variants
Tooltip
EASYBuild a tooltip that shows on hover/focus of a trigger and hides on leave/blur.
15 minLinkedInPractice - UI / FrameworksUI challenge4 variants
Traffic Light
EASYBuild a traffic light that cycles green to yellow to red on a timer and loops indefinitely.
15 minRoblox · Snowflake · Spotify +1Practice - JavaScriptCoding exercise
useBoolean
EASYImplement a hook that exposes a boolean value alongside setTrue, setFalse, and toggle helpers.
15 minPractice - JavaScriptCoding exercise
useCounter
EASYImplement a hook that exposes a numeric count along with increment, decrement, and reset helpers.
15 minPractice - JavaScriptCoding exercise
useCycle
EASYImplement a hook that returns the current value of a sequence and advances to the next on demand.
15 minPractice - JavaScriptCoding exercise
useCycleList
EASYImplement a hook that steps through an array with wraparound, exposing the current item and next/prev/set.
15 minPractice - JavaScriptCoding exercise
useDefault
EASYImplement a hook that falls back to a default value whenever the underlying state becomes null or undefined.
15 minPractice - JavaScriptCoding exercise
useObject
EASYImplement a hook that holds an object in state and exposes helpers to merge updates or reset its value.
15 minPractice - JavaScriptCoding exercise
usePrevious
EASYImplement a hook that remembers and returns the value a state held on the previous render.
15 minPractice - JavaScriptCoding exercise
useSet
EASYImplement a hook that stores a Set in state and exposes add, delete, has, and clear helpers.
15 minPractice - JavaScriptCoding exercise
useStateWithReset
EASYImplement a useState-like hook that also returns a reset function which restores the initial value.
15 minPractice - JavaScriptCoding exercise
useToggle
EASYImplement a hook that holds a boolean and returns a stable toggle function to flip its value.
15 minPractice - JavaScriptCoding exercise
A/B Test Bucketing
MEDIUMAssign users to weighted experiment variants deterministically, with a traffic gate and independent buckets per experiment.
25 minPractice - UI / FrameworksUI challenge4 variants
Accordion II
MEDIUMBuild an accordion component with the correct ARIA roles, states, and properties for screen readers.
25 minPremium questionAmazonPractice - UI / FrameworksUI challenge4 variants
Autoplay Carousel
MEDIUMBuild a carousel that auto-advances, wraps, pauses on hover or focus, and supports manual controls.
25 minPractice - UI / FrameworksUI challenge4 variants
Connect Four
MEDIUMBuild a two-player Connect Four game where discs fall to the lowest empty slot and four-in-a-row wins.
25 minAirbnb · Meta · UberPractice - JavaScriptCoding exercise
ControllableInput
MEDIUMImplement one input component that correctly supports both controlled and uncontrolled state without leaking its reserved props.
25 minPractice - JavaScriptCoding exercise
createGlobalState
MEDIUMBuild a useState shared by every component that calls it, by subscribing React to a store that lives outside it.
25 minPractice - JavaScriptCoding exercise
createStore + useSelector
MEDIUMBuild a store whose subscribers each re-render only when the slice they selected changes.
25 minPractice - UI / FrameworksUI challenge4 variants
Currency Converter
MEDIUMBuild a currency converter with two linked amount fields that recompute from an exchange rate.
25 minPractice - UI / FrameworksUI challenge4 variants
Data Table
MEDIUMBuild a users data table that paginates rows with page-size and page-navigation controls.
25 minAmazon · Atlassian · Coinbase +10Practice - UI / FrameworksUI challenge4 variants
Data Table II
MEDIUMBuild a users data table that lets you sort by any column in ascending or descending order.
25 minPremium questionAmazon · Palantir · StripePractice - UI / FrameworksUI challenge4 variants
Date Picker
MEDIUMBuild a calendar date picker that renders a month grid, navigates between months, and selects a day.
25 minPractice - UI / FrameworksUI challenge4 variants
Dice Roller
MEDIUMBuild a dice roller that lets you pick a count of six-sided dice, roll them, and display the resulting faces.
25 minPractice - UI / FrameworksUI challenge4 variants
Digital Clock
MEDIUMBuild a 7-segment style digital clock that updates to display the current time.
25 minLyftPractice - UI / FrameworksUI challenge4 variants
Dropdown Menu
MEDIUMBuild an accessible action menu with keyboard focus, selection, Escape, and outside-click dismissal.
25 minPractice - JavaScriptCoding exercise
Feature Flag Client
MEDIUMEvaluate feature flags with targeting rules and a deterministic percentage rollout that stays sticky per user.
25 minPractice - UI / FrameworksUI challenge4 variants
File Explorer
MEDIUMBuild a file explorer that renders a nested folder hierarchy and lets you expand and collapse directories.
25 minAdobe · Amazon · Atlassian +7Practice - UI / FrameworksUI challenge4 variants
Grid Lights
MEDIUMBuild a grid of cells that light up on click and then deactivate one by one in the reverse order they were activated.
25 minUberPractice - UI / FrameworksUI challenge4 variants
Image Carousel
MEDIUMBuild an image carousel that lets you page through a sequence of images with previous and next controls.
25 minAirbnb · Amazon · Apple +13Practice - UI / FrameworksUI challenge4 variants
Image Carousel II
MEDIUMBuild an image carousel with smooth slide transitions between images.
25 minAirbnb · Amazon · ByteDance +7Practice - UI / FrameworksUI challenge4 variants
Job Board
MEDIUMBuild a job board that fetches and renders recent Hacker News job postings with paginated loading.
25 minAtlassian · Coinbase · Microsoft +4Practice - UI / FrameworksUI challenge4 variants
Kanban Board
MEDIUMBuild a three-column board where cards drag between columns and each column's count updates.
25 minNavi · SnowflakePractice - JavaScriptCoding exercise
Make Counter II
MEDIUMImplement a factory that returns a counter object with methods to read, increment, decrement, and reset its value.
25 minPremium questionAmazonPractice - UI / FrameworksUI challenge4 variants
Memory Game
MEDIUMBuild a memory card-matching game where players flip cards to find matching pairs.
25 minRoblox · SnowflakePractice - JavaScriptCoding exercise
Mini Jotai Atoms
MEDIUMBuild atom-based state with primitive and derived atoms that recompute and notify subscribers on change.
25 minPractice - JavaScriptCoding exercise
Mini Redux
MEDIUMBuild a Redux core with createStore, combineReducers, and applyMiddleware over a subscribe/dispatch loop.
25 minPractice - UI / FrameworksUI challenge4 variants
Multi-Select
MEDIUMBuild a multi-select where chosen options become removable chips and the rest stay in the list.
25 minPractice - UI / FrameworksUI challenge4 variants
Multi-Step Form
MEDIUMBuild a wizard form with next/back navigation, per-step validation, and a progress indicator.
25 minPractice - UI / FrameworksUI challenge4 variants
Nested Comments
MEDIUMBuild a threaded comments tree where each comment can be replied to and collapsed recursively.
25 minReddit · ServicenowPractice - UI / FrameworksUI challenge4 variants
Notification Center
MEDIUMBuild a notification center with an unread badge, mark-as-read, and dismiss.
25 minPractice - UI / FrameworksUI challenge4 variants
Pixel Art
MEDIUMBuild a pixel art editor where you pick a color from a palette and paint individual cells on a grid canvas.
25 minPractice - UI / FrameworksUI challenge4 variants
Progress Bars II
MEDIUMBuild a list of progress bars that fill in sequence, each one starting only after the previous bar finishes.
25 minPremium questionUberPractice - UI / FrameworksUI challenge4 variants
Progress Bars III
MEDIUMBuild a list of progress bars that fill concurrently with at most three running at the same time.
25 minPremium questionUberPractice - UI / FrameworksUI challenge4 variants
Range Slider
MEDIUMBuild a dual-handle range slider that picks a min and max value by dragging each handle.
25 minPractice - JavaScriptCoding exercise
Redux Middleware (Thunk + Logger)
MEDIUMImplement the curried Redux middleware chain with working thunk and logger middleware.
25 minPractice - JavaScriptCoding exercise
Reselect Selectors
MEDIUMBuild memoized selectors that recompute only when their input selections change by reference.
25 minPractice - UI / FrameworksUI challenge4 variants
Resizable Split Pane
MEDIUMBuild two panes split by a draggable divider that resizes them within min and max bounds.
25 minPractice - JavaScriptCoding exercise
Resumable Interval
MEDIUMImplement an interval helper that exposes start, pause, and resume controls while preserving elapsed progress.
25 minPractice - UI / FrameworksUI challenge4 variants
Shopping Cart
MEDIUMBuild a cart where quantity changes update line totals and a grand total live.
25 minPractice - JavaScriptCoding exercise
Signals (signal / computed / effect)
MEDIUMBuild reactive signals with automatic dependency tracking so computed values and effects update on change.
25 minPractice - UI / FrameworksUI challenge4 variants
Snake Game
MEDIUMBuild the classic snake game on a grid with keyboard control, growth on eating, and game over.
25 minPractice - UI / FrameworksUI challenge4 variants
Sortable List
MEDIUMBuild a list that reorders by drag or keyboard input while preserving focus and announcing each move.
25 minPractice - JavaScriptCoding exercise
SSE Frame Decoder
MEDIUMDecode a Server-Sent Events stream arriving in arbitrary chunks into discrete parsed events.
25 minPractice - UI / FrameworksUI challenge4 variants
Star Rating
MEDIUMBuild an interactive star rating with hover preview and half-star support.
25 minPractice - UI / FrameworksUI challenge4 variants
Star Rating
MEDIUMBuild a star rating component where users click a star to set the rating shown by filled icons.
25 minAirbnb · Amazon · UberPractice - UI / FrameworksUI challenge4 variants
Stopwatch
MEDIUMBuild a stopwatch widget that measures elapsed time with start, stop, and reset controls.
25 minCisco · Lyft · Shopify +2Practice - JavaScriptCoding exercise
Streaming Chat Store Reducer
MEDIUMBuild a pure, immutable reducer that opens an assistant message, appends streamed deltas, and finalizes it.
25 minPractice - UI / FrameworksUI challenge4 variants
Tabs
MEDIUMBuild a tabs component that shows one panel at a time based on the currently selected tab.
25 minAirbnb · Amazon · Codility +6Practice - UI / FrameworksUI challenge4 variants
Tabs II
MEDIUMBuild a tabs component with the correct ARIA roles, states, and properties for assistive tech.
25 minPremium questionAirbnb · AmazonPractice - JavaScriptCoding exercise
ThemeProvider
MEDIUMImplement a context-backed React theme provider with stable controls, functional updates, nesting, and a strict consumer hook.
25 minPractice - UI / FrameworksUI challenge4 variants
Tic-tac-toe
MEDIUMBuild a two-player tic-tac-toe game that detects wins and draws on a 3x3 board.
25 minAirbnb · Amazon · Apple +6Practice - UI / FrameworksUI challenge4 variants
Todo List
MEDIUMBuild a Todo List component with add and delete actions, with focus on functionality over styling.
25 minAmazon · Apollo · Atlassian +7Practice - JavaScriptCoding exercise
ToggleRenderProps
MEDIUMImplement a render-props toggle component that exposes reusable state and stable controls while leaving all markup to its child function.
25 minPractice - UI / FrameworksUI challenge4 variants
Transfer List
MEDIUMBuild a component that moves selected items back and forth between two side-by-side lists.
25 minMeta · Netflix · OpenAI +2Practice - JavaScriptCoding exercise
Turtle
MEDIUMBuild a Turtle class that tracks position and heading as you issue movement and turn commands on a 2D plane.
25 minPractice - JavaScriptCoding exercise
Undo / Redo Manager
MEDIUMImplement a class that tracks value history and exposes undo and redo navigation across the timeline.
25 minAnthropic · Canva · Databricks +3Practice - UI / FrameworksUI challenge4 variants
Undoable Counter
MEDIUMBuild a counter that keeps a history of values so you can undo and redo each change.
25 minPractice - JavaScriptCoding exercise
Undoable Database
MEDIUMBuild a user database class that supports CRUD operations plus undo and redo across the operation history.
25 minAnthropic · Figma · RipplingPractice - JavaScriptCoding exercise
useActionState
MEDIUMImplement a hook that threads state through an async action, folding the previous state into the next and exposing a pending flag.
25 minPractice - JavaScriptCoding exercise
useArray
MEDIUMImplement a hook that manages an array along with helpers to push, remove, update, and clear items.
25 minUberPractice - JavaScriptCoding exercise
useBoolean II
MEDIUMImplement an optimized useBoolean hook whose returned setters keep stable identity across renders.
25 minPremium questionPractice - JavaScriptCoding exercise
useControllableValue
MEDIUMImplement a hook that lets one component work both controlled and uncontrolled, deciding the mode from its props.
25 minPractice - JavaScriptCoding exercise
useCountdown
MEDIUMImplement a hook that drives a countdown timer with start, pause, and reset controls.
25 minWalmartPractice - JavaScriptCoding exercise
useDynamicList
MEDIUMImplement a hook that manages a list whose items keep stable keys across inserts, removals, and reorders.
25 minPractice - JavaScriptCoding exercise
useGetState
MEDIUMImplement a useState variant that also returns a getter for reading the newest state from inside stale closures.
25 minPractice - JavaScriptCoding exercise
useList
MEDIUMImplement a hook managing an array with immutable helpers — push, removeAt, updateAt, insertAt, clear, and set.
25 minPractice - JavaScriptCoding exercise
useMap
MEDIUMImplement a hook that wraps a JavaScript Map with set, delete, and clear helpers backed by state.
25 minPractice - JavaScriptCoding exercise
useMediatedState
MEDIUMImplement a useState-like hook that runs every incoming value through a mediator before committing it.
25 minPractice - JavaScriptCoding exercise
useMethods
MEDIUMImplement a hook that turns a map of state transitions into bound, stable action methods over a reducer.
25 minPractice - JavaScriptCoding exercise
useOptimistic
MEDIUMImplement a hook that shows an optimistic value while an update is in flight, then reconciles to the real value.
25 minPractice - JavaScriptCoding exercise
usePagination
MEDIUMImplement a hook that manages page state over a total count, exposing page, pageCount, and next/prev/go with clamping.
25 minPractice - JavaScriptCoding exercise
usePreviousDistinct
MEDIUMImplement a hook that remembers the last value that actually differed from the current one, with a customizable comparator.
25 minPractice - JavaScriptCoding exercise
useQueue
MEDIUMImplement a hook wrapping a FIFO queue with add, remove, clear, and first/last/size accessors.
25 minPractice - JavaScriptCoding exercise
useReactive
MEDIUMImplement a hook whose state object you mutate directly, and reckon with what that costs React.
25 minPractice - UI / FrameworksUI challenge4 variants
Users Database
MEDIUMBuild a CRUD interface to list, filter, create, edit, and delete users backed by local state.
25 minDatabricks · PayPal · Pinterest +3Practice - JavaScriptCoding exercise
useSelections
MEDIUMImplement a hook that tracks a multi-select over a list, with an all/none/partial header state that stays honest.
25 minPractice - JavaScriptCoding exercise
useStateWithHistory
MEDIUMImplement a useState variant that records value history and exposes back, forward, and go over it.
25 minPractice - JavaScriptCoding exercise
useStep
MEDIUMImplement a hook that drives a multi-step flow with next, previous, reset, and bounded index controls.
25 minPractice - JavaScriptCoding exercise
useSyncExternalStore
MEDIUMImplement the useSyncExternalStore shim — subscribe to an external store and read a consistent snapshot, re-rendering when it changes without missing an update.
25 minPractice - JavaScriptCoding exercise
useUrlState
MEDIUMImplement a useState that lives in the query string, staying shareable without burying the back button.
25 minPractice - JavaScriptCoding exercise
useValidatedState
MEDIUMImplement a useState variant that reports whether the current value passes a validator, without an extra render.
25 minPractice - UI / FrameworksUI challenge4 variants
Whack-A-Mole
MEDIUMBuild the arcade game where moles randomly appear in a grid and players click them to score.
25 minLyftPractice - UI / FrameworksUI challenge4 variants
Accordion III
HARDBuild a fully accessible accordion with keyboard navigation per the ARIA authoring practices guide.
40 minAmazonPractice - JavaScriptCoding exercise
Backbone Model
HARDImplement a Backbone-style Model class that stores attributes and emits change events per key.
40 minAirbnbPractice - UI / FrameworksUI challenge4 variants
Calendar Scheduler
HARDBuild an accessible week-view scheduler with add/remove controls, live announcements, and spatial keyboard navigation.
75 minPremium questionPractice - UI / FrameworksUI challenge4 variants
Data Table IV
HARDBuild a generalized data table component that supports pagination, column sorting, and per-column filtering.
40 minAmazon · Databricks · Palantir +7Practice - UI / FrameworksUI challenge4 variants
Data Table V
HARDBuild a data table with sortable columns, pagination, and row selection over a dataset.
40 minPremium questionPractice - UI / FrameworksUI challenge4 variants
Image Carousel III
HARDBuild an image carousel that smoothly transitions between images while keeping the DOM footprint minimal.
40 minAirbnb · Amazon · ByteDance +7Practice - UI / FrameworksUI challenge4 variants
Lazy Tree View
HARDBuild a collapsible tree that lazily loads a node's children the first time it is expanded.
40 minPremium questionPractice - UI / FrameworksUI challenge4 variants
Minesweeper
HARDBuild Minesweeper with flood-fill reveal, flagging, and win/lose detection.
40 minPremium questionPractice - JavaScriptCoding exercise
Mini MobX
HARDBuild MobX-style observables with autorun and computed that re-run when the data they read changes.
40 minPremium questionPractice - JavaScriptCoding exercise
Mini React Query Core
HARDBuild a framework-agnostic query cache with request dedup, staleTime, subscribers, and invalidation.
40 minPremium questionPractice - UI / FrameworksUI challenge4 variants
Nested Checkboxes
HARDBuild a nested checkbox tree where parent state reflects its children and toggling a parent cascades down.
40 minGoogle · MetaPractice - JavaScriptCoding exercise
Optimistic Mutation Manager
HARDApply optimistic updates immediately and roll them back on failure, even with concurrent mutations.
40 minPremium questionPractice - UI / FrameworksUI challenge4 variants
Progress Bars IV
HARDBuild progress bars that fill concurrently up to three at a time, and let the user pause and resume each one.
40 minPremium questionUberPractice - JavaScriptCoding exercise
Redux-Saga Effect Runner
HARDBuild a redux-saga-style interpreter that runs a generator of declarative effects and resumes it with each result.
50 minPremium questionPractice - UI / FrameworksUI challenge4 variants
Rich Text Editor
HARDBuild a contenteditable rich-text editor with bold/italic/list formatting and a live toolbar state.
40 minPremium questionPractice - UI / FrameworksUI challenge4 variants
Selectable Cells
HARDBuild a grid where you click and drag across cells to select a rectangular range of them.
40 minPremium questionPractice - UI / FrameworksUI challenge4 variants
Spreadsheet Grid
HARDBuild a grid of cells with formula evaluation and dependent-cell recalculation.
40 minPremium questionPractice - JavaScriptCoding exercise
Statechart Engine (XState-lite)
HARDBuild a state-machine engine with events, guards, entry and exit actions, and context updates.
40 minPremium questionPractice - UI / FrameworksUI challenge4 variants
Tabs III
HARDBuild a fully accessible tabs component with arrow-key navigation per the ARIA authoring guide.
40 minAirbnb · AmazonPractice - UI / FrameworksUI challenge4 variants
Tetris
HARDBuild Tetris with falling tetrominoes, rotation, line clears, and scoring.
40 minPremium questionPractice - UI / FrameworksUI challenge4 variants
Tic-tac-toe II
HARDBuild a generalized tic-tac-toe game on an N x N board where M consecutive marks wins.
40 minAmazon · Apollo · Apple +4Practice - UI / FrameworksUI challenge4 variants
Transfer List II
HARDBuild a transfer list with bulk select, deselect, and the ability to add new items to either side.
40 minTikTokPractice - JavaScriptCoding exercise
Undo / Redo Manager II
HARDBuild a class that tracks draft values and commits them as batch checkpoints for undo and redo navigation.
40 minAnthropic · FigmaPractice - JavaScriptCoding exercise
Undoable Database II
HARDBuild a user database that buffers draft mutations and commits them as batch undo and redo checkpoints.
40 minAnthropic · FigmaPractice - JavaScriptCoding exercise
useForm
HARDImplement a form-state hook managing values, touched, errors, validation, and submission.
40 minPremium questionPractice - JavaScriptCoding exercise
useUndoRedo
HARDImplement an undo/redo state hook exposing undo, redo, canUndo, canRedo over past/present/future stacks.
40 minPremium questionPractice - UI / FrameworksUI challenge4 variants
Wordle
HARDBuild the Wordle word-guessing game with row-by-row guesses and per-letter color feedback.
40 minRamp · TekionPractice