Skip to content
tezvyn:
Menu

React & Next.js

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

90 bites

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

Advanced everything in React & Next.js, page 5

useSyncExternalStore: Safely Read from External State
advanced2 min read

useSyncExternalStore: Safely Read from External State

useSyncExternalStore lets your React components safely subscribe to data outside of React's state. Use it to connect to state libraries like Zustand or browser APIs. The main footgun: your getSnapshot function must return an immutable, cached value.

useDeferredValue: Keep UI Responsive During Renders
advanced2 min read

useDeferredValue: Keep UI Responsive During Renders

useDeferredValue keeps your UI responsive by showing a stale value while a new, expensive-to-render value is prepared in the background. Use it for search inputs filtering large lists.

useTransition: Keep Your UI Responsive During State Changes
advanced2 min read

useTransition: Keep Your UI Responsive During State Changes

useTransition lets you update state without blocking the UI, keeping your app responsive. Use it for slow renders like filtering large lists, while the isPending flag shows a loading state.

useImperativeHandle: Expose a Custom Ref API
advanced2 min read

useImperativeHandle: Expose a Custom Ref API

useImperativeHandle exposes a custom API via a ref, letting a parent call specific methods on a child. Instead of exposing an entire DOM node, you can provide a handle with methods like reset() or focus().

useLayoutEffect: Synchronous Effects Before Browser Paint
advanced2 min read

useLayoutEffect: Synchronous Effects Before Browser Paint

useLayoutEffect is useEffect's synchronous twin, running its code after DOM mutations but before the browser repaints. Use it to read DOM layout and re-render to prevent visual flickers, like positioning a tooltip. Its main footgun: it blocks rendering.

React's Stale Closure Problem in Hooks
advanced2 min read

React's Stale Closure Problem in Hooks

A useEffect closure captures props and state from its render. If the effect doesn't re-run, its functions can operate on old, "stale" data. This surfaces in timers or socket listeners. The footgun is omitting dependencies, which causes these subtle bugs.

advanced2 min read

React's Rule: Favor Composition Over Inheritance

Instead of extending a base component, build complex UIs by wrapping and configuring smaller ones. Use this for generic containers like dialogs or for creating specialized versions of a component.

React Refs: Memory Without Re-renders
advanced2 min read

React Refs: Memory Without Re-renders

A React ref is like a secret pocket for your component to remember information without triggering re-renders. Use it to hold values not needed for rendering, like a timer ID. The footgun: changing a ref's value won't update the UI; use state for that.

Server Components, explained without the jargon
easy2 min read

Server Components, explained without the jargon

React Server Components render on the server and send the client a description of the result, not JavaScript. That means no bundle cost for server rendered parts and direct database access, with client components handling only the interactive pieces.

React interview cheatsheet: hooks rules in 60 seconds
easy2 min read

React interview cheatsheet: hooks rules in 60 seconds

The rules of hooks exist because React identifies each hook by call order, not by name. Call hooks only at the top level of a component or custom hook, never inside a loop, condition, or nested function, or state attaches to the wrong hook.

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