Frontend Component and State Architecture Questions

Structuring client applications for maintainability: component architecture and code organization (composition and compound components, container/presentational split, controlled vs uncontrolled components, prop drilling and context, refs and imperative handles, folder and module boundaries as a codebase grows), state management and data flow (local vs global state, state colocation and lifting, reducers and stores, selectors and derived state, normalization, immutability, one-way flow, migrating a legacy global store incrementally), how the UI framework turns state into screen updates (hooks and effect dependencies, re-render behaviour, memoization trade-offs, keys, update batching, concurrent rendering and transitions, plus the same ideas in Angular services and change detection), data-fetching patterns (server-state caching, stale-while-revalidate, optimistic updates and rollback, request deduplication, cursor pagination, normalized GraphQL caches, merging live socket events and partial failures into local state, undo and redo history), URL state and route-scoped data, micro-frontends and cross-team state ownership and isolation, framework-agnostic web components, event-bus communication between distant widgets, and rendering strategy trade-offs (CSR, SSR, hydration and mismatches, progressive enhancement). Covers designing a frontend that scales in complexity without becoming brittle. Reusable component libraries as design systems, form and dialog implementation, accessibility practice, render-speed tuning, language typing mechanics, browser storage APIs and offline persistence, conflict-resolution protocols for collaborative editing, and testing strategy are covered elsewhere.

EasyTechnical
84 practiced

What is useReducer, and when would you choose it over useState? Use a multi-field form or an undo history as an example.

HardSystem Design
127 practiced

Design the client-side state architecture for an e-commerce SPA with catalog browsing, a cart that responds instantly, live inventory updates and shared product entities. Which state lives where, and how does data flow for reads and writes?

MediumTechnical
73 practiced

A memoized child stopped updating after a refactor: the parent now edits a nested object in place and passes the same reference down. How do you find the bug, why does it happen, and where do you fix it?

HardSystem Design
72 practiced

A complex screen has many independent widgets that must react to each other: notifications, a global filter and a shared selection. Compare the ways they could communicate (events, a shared bus, lifted state or context, message passing), and say which you would choose and why, considering testability, leaks and performance.

MediumTechnical
79 practiced

Two setState calls in a click handler produce one render, but the same two calls inside a setTimeout used to produce two. Explain batching and what changed in React 18.

Unlock Full Question Bank

Get access to all Frontend Component and State Architecture interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.