Learn · Topics

Concepts that don't fit one technology

Curated explainers for the concepts that come up in interviews and real work: the event loop, idempotency, caching, CORS, indexing. Diagrams, examples, and interview questions.

Notes by stackQuizzes

Frontend Architecture

7
Memoization in React: memo, useMemo, useCallbackWhy React re-renders a whole subtree, why a new object or function each render defeats React.memo, when memoizing pays off, and what the React Compiler changes.Intermediate·13 min·interview favoriteReact Server ComponentsHow one React tree becomes two programs, what may cross the server/client boundary, why the payload is not HTML, and how streaming and server actions fit in.Intermediate·14 min·interview favoriteState Management Trade-offs in Frontend AppsSort state by where it belongs before picking a library: server cache, URL, form, local UI or shared store, and why Context re-renders every consumer.Intermediate·14 min·interview favoriteVirtual DOM and ReconciliationWhat the virtual DOM really is, how React diffs two trees in linear time, why keys decide which state survives, and how Fiber and signals change the picture.Intermediate·13 min·interview favoriteHydration and Hydration ErrorsHow server HTML becomes an interactive app, why the first client render must match it exactly, what causes mismatches, and how to hydrate less.Intermediate·13 min·interview favoriteOptimistic UI: Updating Before the Server AnswersShow the result of a click before the server confirms it, then reconcile or roll back. Which actions suit it, and how to survive races, refetches and retries.Intermediate·12 min·interview favoriteWeb Accessibility FundamentalsHow the browser turns your DOM into the accessibility tree screen readers use, why semantic HTML beats ARIA, and how to get keyboard, focus and forms right.Intermediate·14 min·interview favorite

System Design

9
Caching StrategiesCache-aside, read-through, write-through and write-behind, keeping a cache correct with TTLs, invalidation and versioned keys, and surviving stampedes.Intermediate·13 min·interview favoriteCAP Theorem in PracticeWhat CAP really constrains (only behaviour during a partition), why "pick two" is wrong, and how PACELC, quorums and consistency models become design choices.Intermediate·14 min·interview favoriteIdempotency in APIsWhy retries create duplicate orders and double charges, which HTTP methods are safe to repeat, and how idempotency keys make any request safe to retry.Intermediate·11 min·interview favoriteMessage Queues and At-Least-Once DeliveryWhy a broker can promise at-least-once but never exactly-once, queue versus log, and how idempotent consumers and the outbox make delivery effectively once.Intermediate·14 min·interview favoriteRate LimitingToken bucket vs sliding window, where to enforce limits, how to keep counters correct across servers with Redis, and what a good 429 response looks like.Intermediate·12 min·interview favoriteConsistent HashingWhy hash(key) mod N remaps everything when N changes, how a hash ring moves only 1/N of keys, what virtual nodes fix, and where rendezvous, jump and Maglev fit.Intermediate·12 min·interview favoriteEvent Sourcing and CQRSStoring state as an append-only log of events, rebuilding it by replay, and serving reads from separate projections, plus the costs: versioning and stale reads.Advanced·15 min·interview favoriteThe Production Readiness ChecklistWhat a well-built app has in place, from a domain glossary to feature flags, error tracking and a changelog, and how it shifts by stage and for B2B vs B2C.Intermediate·15 min·interview favoriteThe Transactional Outbox PatternWhy saving to the database and publishing an event can never be atomic, how an outbox table plus a relay fixes it, and what ordering and duplicates still cost.Intermediate·13 min·interview favorite

Security

7
JWT vs SessionsWhere the source of truth for "who is this user" lives, why that decides revocation, storage and CSRF, and how to verify a JWT without shooting yourself.Intermediate·13 min·interview favoriteOAuth 2.0 and PKCEHow the authorization code flow lets an app act for a user without their password, what PKCE proves, and where tokens should live in a SPA.Intermediate·14 min·interview favoriteSQL Injection: How It Works and How to Stop ItWhy gluing input into SQL text lets data become code, why bind parameters fix it for good, and where ORMs, identifiers and stored procedures still leak.Intermediate·13 min·interview favoriteXSS and Content Security PolicyWhy injected script gets your origin’s full powers, the three kinds of XSS and their sinks, encoding per context, and how a nonce CSP stops what slips through.Intermediate·14 min·interview favoriteCORS: Cross-Origin Resource SharingWhy the browser blocks a response that curl can read, what a preflight is, how credentials change the rules, and how to configure a server without a hole.Intermediate·11 min·interview favoritePrompt Injection: Why LLM Apps Obey the Wrong TextWhy text an LLM reads can override your instructions, how indirect injection turns tools into exfiltration paths, and which defences actually contain it.Intermediate·14 min·interview favoriteSecrets Management: Store, Rotate, Never LeakWhere API keys and passwords really leak, why env vars deliver secrets but do not protect them, and how secret managers and short-lived credentials fix it.Intermediate·14 min·interview favorite

Keep your own notes next to these explainers, and get them suggested in your interview prep plan.

Start free