Common interview questions with model answers, common mistakes and follow-ups.
/
Active filters: 1
93 results
How do you associate a label with an input, and why is a placeholder not enough?
JuniorVery commonhtmlform-labels
What is the difference between undefined and null, and what does typeof return for each?
JuniorVery commonjavascriptnull-undefined
How do a plain external script, a defer script, and an async script affect HTML parsing?
JuniorVery commonhtmlscript-loading
A form's submit button reloads the whole page in your React app. Why, and how should you handle submission?
JuniorVery commonreactforms
Memory usage of a long-running React single-page app keeps growing as users navigate. How would you find and fix the leak?
SeniorCommonreactmemory-leaks
How do you decide where the boundary between React Server Components and Client Components should go, and what can cross it?
SeniorVery commonreactserver-components
What is the difference between server state and client state, and why do teams often use a library like TanStack Query for the former?
MiddleVery commonreactstate-management
A large React app keeps almost all state in one global store, and every change causes widespread re-renders. How would you restructure its state?
SeniorCommonreactarchitecture
What is the difference between onClick={handleClick} and onClick={handleClick()}, and how do you pass an argument to a handler?
JuniorVery commonreactevents
Why shouldn't you update state by pushing into an array or changing an object's field directly?
JuniorVery commonreactimmutability
What is the children prop, and why is composition often better than adding more props?
JuniorCommonreactcomposition
What is useRef used for, and how is it different from useState?
JuniorVery commonreactuseref
A table renders 10,000 rows and scrolling is slow. How does list virtualization help, and what are its trade-offs?
MiddleCommonreactperformance
When do useMemo and useCallback actually improve performance, and when are they wasted effort?
MiddleVery commonreactusememo
What is JSX, and what does it turn into before the browser runs it?
JuniorVery commonreactjsx
In development, your useEffect runs twice when the page loads. Is that a bug?
JuniorCommonreactstrict-mode
How does optional chaining work in user?.address?.city, and why would you combine it with ?? instead of ||?
JuniorVery commonjavascriptoptional-chaining
A profile page fetches data in useEffect when the userId changes. Quickly switching users sometimes shows the wrong profile. Why, and how do you fix it?
MiddleVery commonreactdata-fetching
Why must React components be pure during rendering, and what breaks under concurrent rendering if they are not?
SeniorCommonreactconcurrent-rendering
Typing in a search box that filters a large list feels laggy. What would you check, and which techniques would you use?