All bites
The whole library, newest first. Filter by what you are here for, or pick a topic if you already know.
4330 bites
Page 21
Tearing and useSyncExternalStore in concurrent React
Tearing is inconsistent UI when an interruptible render reads a changed external store mid-pass; useSyncExternalStore subscribes and forces consistent snapshots, re-rendering synchronously on change.

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.

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.

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.
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.
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.
Purpose of Outlet in React Router v6 nested routes
Outlet renders the matched child route inside a parent layout, enabling shared chrome with swappable content; configure nested routes and place Outlet where children render.

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.
How do React Profiler flame and ranked charts pinpoint bottlenecks?
Flame chart width and color show duration with children; ranked chart sorts by self-time to surface the top component.
How to implement a derived Redux slice performantly and maintainably?
This tests minimal state and memoized selector design. Use Reselect's createSelector to compute data from multiple slices, keeping state minimal and avoiding redundant work. A red flag is storing derived values in Redux or recalculating without memoization.
Explain the difference between Server and Client Components in Next.js
Server components run on the server with no client JS and access backends directly; client components ship JS and handle state.
What is the Virtual DOM and why does React use it?
This tests reconciliation as declarative abstraction, not raw speed. Good answers define VDOM as in-memory UI synced to the real DOM, explain declarative state mapping, and note fibers enable incremental rendering.
How do you ensure a complex form is fully accessible?
Pair labels to inputs, move focus to first error on submit, and link aria-invalid to aria-describedby.
What drives your choice between Zustand and Redux Toolkit at scale?
What it tests: matching state philosophy to constraints, not hype. Outline: weigh Zustand's minimal footprint against Redux Toolkit's DevTools and structured async patterns. Red flag: claiming one is always better regardless of team size or debugging needs.
How do you manage database connections in serverless Next.js API routes?
This tests serverless concurrency and connection limits. A strong answer notes lambda scaling exhausts DB connections, advocates connection pooling or serverless drivers, and caches the client globally.
How vision, strategy, and roadmap relate
Vision is the long-term aspiration, strategy is the chosen path to it, the roadmap is time-bound execution that delivers the strategy.
What are the risks of a roadmap without product strategy?
Risks include building wrong things fast, orphaned features, and tradeoff paralysis.

How would you frame a major refactoring proposal using product strategy?
Reframing tech debt as delivery risk, not engineering chore. Tie refactoring to velocity loss and firefighting; shift accountability from dev-vs-ops fights to product ownership.

How do you assess architecture impact during a corporate pivot?
Tests business-technical alignment under strategic uncertainty. Strong answers map new outcomes to capability gaps, assess debt and migration cost, then co-own replanning with product. Red flag: proposing a full rewrite before understanding limits or ROI.

How would you validate strategic assumptions through shipped software?
Tests whether you embed validation into engineering delivery rather than treating it as pre-work. Strong answers cover assumption mapping, instrumented MVPs, tiered rollouts, kill criteria, and product-engineering feedback loops.