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.

MediumTechnical
99 practiced

A parent re-renders every second because of a timer. Which of its children re-render, which do not, and what decides it?

EasyTechnical
74 practiced

This component renders {items.length && <List items={items} />} and the page shows a stray 0 whenever the list is empty. Explain why it happens and describe the conditional rendering approaches you would use in JSX and when each is the right choice.

MediumTechnical
75 practiced

Define optimistic versus pessimistic updates. Give two cases where each is the better choice, and say what the user should see when an optimistic update fails.

EasyTechnical
76 practiced

A teammate asks when something should be a prop and when it should be state. How do you explain the difference, and how do you decide in a concrete example such as a product card with a quantity stepper?

MediumTechnical
145 practiced

Users tap a like button five times quickly on a flaky connection. Implement the click path so the UI responds immediately, a failed request rolls back correctly, and rapid taps do not leave the count wrong.

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.