Skip to content
tezvyn:

React & Next.js

React, Next.js, Remix, RSC, React ecosystem

155 bites

Test yourself: Top 30 intermediate React & Next.js interview questionsMultiple choice, with the correct answer and why it is correct on every question. Free, no sign-in.

Intermediate everything in React & Next.js, page 2

How do React Router v6.4 loaders change data fetching from useEffect?
intermediate2 min read

How do React Router v6.4 loaders change data fetching from useEffect?

This tests moving from fetch-on-render to render-as-you-fetch. Explain that loaders fire before render, removing useEffect waterfalls, while the router ignores stale promises on interruption. Red flag: calling loaders just useEffect outside the component.

intermediate2 min read

Is Tailwind maintainable at scale, and what patterns support your claim?

Tests your CSS architecture judgment with utility-first scaling patterns. Strong answers pick a side, citing three patterns: strict tailwind config, components hiding class soup, and sparing @apply.

intermediate2 min read

Purpose of tailwind.config.js content array and JIT scanning

Tests knowledge of Tailwind's scan-to-generate pipeline. Strong answer: content defines files to scan as plain text for class tokens; JIT emits CSS only for discovered classes, keeping production CSS tiny. Red flag: calling it AST parsing or PurgeCSS config.

Compare CSS Modules and runtime CSS-in-JS libraries across DX, performance, and dynamic styling
intermediate2 min read

Compare CSS Modules and runtime CSS-in-JS libraries across DX, performance, and dynamic styling

This tests build-time vs runtime style architecture trade-offs. A strong answer contrasts CSS Modules' static extraction with CSS-in-JS's prop-driven runtime injection, covers dynamic styling patterns, and weighs SSR and bundle costs.

What limits React inline styles and when are they still appropriate?
intermediate2 min read

What limits React inline styles and when are they still appropriate?

This tests React styling trade-offs. Outline: no pseudo-classes, media queries, or keyframes; maintenance and perf costs; good for dynamic state styling, prototyping, FOUC prevention, and small components. Red flag: claiming they are always bad or free.

How would you implement a custom useDebounce hook using useState and useEffect?
intermediate2 min read

How would you implement a custom useDebounce hook using useState and useEffect?

It tests effect cleanup and stale closure awareness. Use useState for the debounced value, useEffect to set a setTimeout when the input changes, and return a cleanup calling clearTimeout. Omitting cleanup leaks timers and fires stale values.

How does React batch multiple setState calls in one event handler?
intermediate2 min read

How does React batch multiple setState calls in one event handler?

Tests your grasp of React batching and stale closures. React queues updates until the handler exits, so multiple literal setState calls with the same stale value update once, while updater functions queue sequentially.

Why is Fiber's render phase interruptible but commit is not?
intermediate2 min read

Why is Fiber's render phase interruptible but commit is not?

Render calculates changes on invisible tree; commit runs DOM mutations and lifecycles synchronously.

intermediate2 min read

Why did React replace the Stack Reconciler with Fiber?

Tests React scheduling limits. Good answers note the old reconciler was synchronous and recursive, blocking the main thread, while Fiber enables incremental rendering and interruptible work. Red flag: citing Hooks or vague speed claims without frame budgets.

intermediate2 min read

Describe React's diffing algorithm and its O(n) heuristics

Different types unmount and rebuild; same types patch attributes and recurse; keys hint stable identity for children.

intermediate2 min read

Describe a robust automatic token refresh strategy in a React SPA

This tests token rotation without UX interruption in SPAs. Use HttpOnly cookies for refresh tokens, in-memory access tokens, an interceptor with a promise lock, and proactive background refresh.

intermediate2 min read

How do you handle user-specific content on a getStaticProps page?

Tests the static generation boundary. A strong answer serves a static shell, then hydrates user state client-side via useEffect or SWR. Red flag: claiming getStaticProps can read cookies at build time.

intermediate2 min read

Explain how next/image's sizes prop works for responsive performance

This tests your knowledge of the browser responsive image algorithm. The sizes prop declares the rendered width at each breakpoint so the browser can select the smallest adequate srcset candidate.

intermediate2 min read

How to structure translations and load locale content in App Router

Tests App Router i18n architecture with next-intl. Answer: locale-prefixed routes, JSON message files with ICU syntax, and next-intl APIs consumed in Server Components. Red flag: using client-side locale state instead of integrated routing.

intermediate2 min read

Full Route Cache vs Data Cache and per-fetch cache control

Tests App Router's dual caching layers. Full Route Cache stores rendered HTML and RSC payload at build time; Data Cache stores raw fetch results across routes. Control a fetch with cache and next.revalidate options.

intermediate2 min read

Where Next.js Middleware executes and Edge Runtime limits

Tests your grasp of Edge Runtime constraints. Middleware runs at the Edge before route matching, with no Node.js APIs, require, Buffer, or dynamic eval, only Web APIs. Red flag: treating it as Node.js and suggesting fs or npm packages.

intermediate2 min read

How do you read headers and search params in a Route Handler?

Tests fluency with the Web Standard Request API in Next.js App Router. A strong answer uses request.headers.get() for headers and request.nextUrl.searchParams for query params, avoiding Express-style req.query or req.headers.authorization.

intermediate2 min read

How do you handle multiple HTTP methods in a single route.ts file?

Tests App Router Route Handler REST conventions. A strong answer exports named GET, PUT, DELETE handlers using NextRequest and NextResponse.json, plus 405 for unsupported methods.

intermediate2 min read

How do you create a dynamic API route and access its parameter?

This tests Next.js routing conventions and dynamic parameter extraction. Create /api/products/[productId]/route.js, export a GET handler, and read productId from params. Red flag: mixing App Router params with Pages Router req.query.

intermediate2 min read

GET caching in Route Handlers and how to opt out

Tests App Router GET Route Handler caching and dynamic opt-outs. Hit: export const dynamic = 'force-dynamic', revalidate = 0, dynamic APIs like cookies(), and unstable_noStore(). Red flag: confusing this with Pages Router API routes, dynamic by default.

We are hiring for this. Every open role lists the topics its interview covers, so you can prepare for the real thing rather than guessing.

See open roles