React
Components, hooks, state, rendering and performance — what every React interview actually covers.
0/385
- 1What is React?Junior
- 2Why is React called a declarative library?Junior
- 3What is a component in React?Junior
- 4What is the declarative approach?Junior
- 5What is JSX?Junior
- 6Why does JSX require a single root element?Junior
- 7What does `<React.Fragment>` do?Junior
- 9Why className, not class?Middle
- 10What is Virtual DOM?Junior
- 11What is reconciliation?Middle
- 12What does key do in lists?Junior
- 13Duplicate keys in listsJunior
- 14Component re-render decisionJunior
- 16What is "Fiber architecture"?Middle
- 17Why is React DevTools needed?Middle
- 1What is a component in React?Junior
- 2What types of components exist?Junior
- 3Class vs functional componentJunior
- 4What should a component return?Junior
- 6Default value for propsJunior
- 7Can props be changed inside a component?Junior
- 8What happens if you change props directly?Junior
- 9What is children?Junior
- 10How to pass JSX into another component?Junior
- 11What is component composition?Junior
- 12What is a "container component"?Junior
- 13What is a "presentational component"?Junior
- 15What is HOC?Junior
- 16What is "prop drilling"?Junior
- 17What are "controlled" and "uncontrolled" components?Junior
- 1What is "state" (State)?Junior
- 2State VS propsMiddle
- 3Where is component state stored?Junior
- 4Changing state directlyJunior
- 5Why doesn't setState update state immediately?Junior
- 6What does React do when state updates?Junior
- 8initialValue for useStateJunior
- 9How to update state based on the previous value?Junior
- 10New object when updating stateJunior
- 11Multiple setState callsJunior
- 12What is batching?Junior
- 13What is state immutability?Junior
- 14How do you update an array element in state?Junior
- 15Flat state (flat state)Junior
- 16useReducer vs useStateJunior
- 17memo() and stateJunior
- 18What does "state colocation" do?Middle
- 20How to create global state with useContext?Junior
- 21What is "derived state"Junior
- 22What does "state lifting" mean?Junior
- 23client-side state VS server-side stateMiddle
- 1What is a hook in React?Junior
- 2Why did hooks replace class components?Junior
- 3What do hooks do?Junior
- 4Rules of hooksJunior
- 6All about useStateJunior
- 7What does useEffect() do?Junior
- 8When does an effect without dependencies run?Junior
- 9Empty dependency arrayJunior
- 10cleanup in useEffectJunior
- 11Why is it important to specify all effect dependencies?Junior
- 13In-depth questions on useRefJunior
- 14useRef for accessing a DOM elementJunior
- 15What does forwardRef() do?Junior
- 16What does useMemo() do?Middle
- 17When should you use useMemo()Junior
- 18What does useCallback() do?Junior
- 19When to use useCallback()?Junior
- 20What does `useContext()` do?Middle
- 21Re-render when the context changesJunior
- 22How do you optimize working with context?Junior
- 24useReducer() VS useState()Junior
- 25What does dispatch() do?Junior
- 26What does useLayoutEffect do?Junior
- 27When does React run useLayoutEffect()?Junior
- 28When should you use useLayoutEffect?Junior
- 29What does useInsertionEffect() do (React 18)?Middle
- 30What does useTransition() do?Junior
- 31What does startTransition() do?Junior
- 32What does useDeferredValue() do?Junior
- 33What does useId() do?Junior
- 34What does `useSyncExternalStore()` do?Middle
- 36How do you create a custom hook?Junior
- 37Other hooks inside a custom hookJunior
- 38How do you separate business logic and UI with custom hooks?Junior
- 1What is Context in React?Junior
- 2What problems does Context solve?Junior
- 3How do you create a Context?Junior
- 4What does <Context.Provider> do?Junior
- 6Accessing context in a componentJunior
- 7Multiple contexts in an applicationJunior
- 8How does Context work in Server Components?Middle
- 9Re-rendering child elementsJunior
- 10Context optimizationJunior
- 11What does the "selector pattern" do in context?Junior
- 12What does the "compound components" pattern do with context?Junior
- 14Why isn't Context always suitable for global state?Junior
- 15What is the "Context + Reducer" pattern?Junior
- 16What is Redux?Junior
- 17What principles is Redux based on?Junior
- 18What does store do in Redux?Junior
- 19What is a reducer?Junior
- 20What is an action in Redux?Junior
- 21What does dispatch() do?Junior
- 22What does subscribe() do?Junior
- 24What is a pure reducer (a pure function)?Junior
- 25What does combineReducers() do?Junior
- 26Mutating state in a reducerJunior
- 27How do store, actions, and reducers interact?Junior
- 28What does the useSelector() hook do?Junior
- 29What does the useDispatch() hook do?Junior
- 30What is Redux Toolkit?Junior
- 32What is a Slice in RTK?Junior
- 33How does RTK implement immutability?Junior
- 34What does Immer.js do inside Redux Toolkit?Junior
- 35What does redux-thunk do?Junior
- 36How is a thunk different from a regular action?Junior
- 37What does abort() do in a thunk?Junior
- 38What is RTK Query?Junior
- 39How does RTK Query cache data?Junior
- 40What is Effector?Junior
- 41Why is Effector called a "reactive state manager"?Junior
- 42How does Effector differ from Redux?Junior
- 44What is "event" in Effector?Junior
- 45What is an "effect" in Effector?Junior
- 46What is a "domain"?Junior
- 47What does sample() do in Effector?Junior
- 48What does forward() do?Junior
- 49What does guard() do?Junior
- 50What does merge() do?Junior
- 51What does split() do?Junior
- 52What does `createGate()` doMiddle
- 53What is MobX?Junior
- 55makeObservable and makeObservableMiddle
- 56What is observable in MobX?Junior
- 57What is a computed value in MobX?Junior
- 58What is action in MobX?Junior
- 59What does reaction() do?Junior
- 60How does MobX track dependencies?Junior
- 61What does the autorun() function do?Junior
- 62What does the when() function do?Junior
- 64Why is Zustand called a minimalist state manager?Junior
- 65What is a "store" in the context of Zustand?Junior
- 66Accessing stateJunior
- 67Why are Zustand hooks called "selective"?Junior
- 68Subscribing to a field in ZustandJunior
- 69The unopinionated principleMiddle
- 70What is middleware in Zustand?Junior
- 71What does the immer middleware do?Junior
- 73Transparent reactivityJunior
- 1What is the "lifecycle" of a component in React?Junior
- 2Stages of the lifecycleJunior
- 3Class vs function component lifecycleJunior
- 4What happens when a component mounts?Junior
- 5What happens when a component updates?Junior
- 7What are "commit phase" and "render phase"?Middle
- 8How is the lifecycle related to the Virtual DOM?Junior
- 9What causes a re-render?Junior
- 10What does componentDidUpdate() do?Junior
- 11What does shouldComponentUpdate() do?Junior
- 12What does componentWillUnmount() do?Junior
- 13What does the cleanup function do in useEffect()?Junior
- 14useEffect as a replacement for lifecycle methodsJunior
- 16How does React determine which components need to be updated?Junior
- 17What does Fiber Architecture do in the context of the lifecycle?Middle
- 18How is React.memo() similar to shouldComponentUpdate()?Middle
- 19How did React 18 change the lifecycle?Middle
- 20What is Concurrent Rendering?Middle
- 21Why can React now interrupt rendering?Middle
- 22What does "transition" do in the render lifecycle?Middle
- 23Why is useEffect not guaranteed to run right after commit?Middle
- 25What does "flushSync()" do?Junior
- 1What is rendering in React?Junior
- 2Component re-renderJunior
- 3What does Virtual DOM do?Junior
- 4What is the "diffing algorithm"?Junior
- 5Keys (key) and renderingJunior
- 6What does the Fiber architecture do in React?Middle
- 8commit phase VS render phaseMiddle
- 9Strict mode and double renderingMiddle
- 10Passing callback functionsJunior
- 11What does useCallback() do?Junior
- 12What does useMemo() do?Junior
- 13What does React.memo() do?Junior
- 15Optimizing long listsJunior
- 16What does "windowing" / "virtualization" do?Middle
- 17What is lazy loading of components?Junior
- 18Global state and performanceJunior
- 19What does "state normalization" do?Middle
- 20What is batching in React?Junior
- 21What does startTransition() do?Junior
- 22What does React.lazy() do?Junior
- 24What are React Server Components (RSC)?Junior
- 25What does React Profiler do?Junior
- 1Declarativeness in ReactJunior
- 2Single source of truthMiddle
- 3Component-based approachJunior
- 4What is a "pure function component"?Junior
- 5What is the "Container-Presentational Pattern"?Junior
- 6What are "Smart" and "Dumb" components?Junior
- 8Feature-Sliced DesignJunior
- 9The Colocation principle in component architectureJunior
- 10Domain-Driven Design in ReactMiddle
- 11Module isolationJunior
- 12What is "Layered Architecture" in frontend?Junior
- 13What is a "Controlled Component"?Junior
- 14How is an "Uncontrolled Component" different?Middle
- 16What does the "Render Props" pattern do?Junior
- 17What does a "Higher-Order Component (HOC)" do?Junior
- 18Component compositionJunior
- 19What does the "Function as Child" pattern do?Junior
- 20What is the "Slot Pattern"?Junior
- 21What are React Server Components (RSC)?Junior
- 22What does the "Control Props" pattern do?Junior
- 23Custom hooksJunior
- 25SRP in React componentsJunior
- 26What does the "Micro-frontend" approach do with React?Senior
- 27What does "SSR + Hydration" mean?Junior
- 1What is routing in a React application?Junior
- 2Client-side vs server-side routingJunior
- 3What does the react-router-dom library do?Junior
- 4Why doesn't the page reload during routing?Junior
- 6What does MemoryRouter do?Junior
- 7What does the useNavigate() hook do?Junior
- 8What does useLocation() do?Junior
- 9What does useParams() do?Junior
- 10What does useSearchParams() do?Junior
- 11How do you get query parameters from a URL?Junior
- 12What are "nested routes"?Junior
- 13What does <Outlet> do?Junior
- 1Working with asynchronous operationsJunior
- 2Requests in a component's bodyJunior
- 3useEffect and asynchronous codeJunior
- 5Request on the first renderMiddle
- 6How to cancel a request inside useEffect()?Junior
- 7How to implement a loading indicator (Loader)?Junior
- 8Why can't you store promises in state?Junior
- 9Why cache request results?Junior
- 10Cache invalidationJunior
- 11What is an "optimistic update"?Junior
- 12What are "debounce" and "throttle" for requests?Junior
- 13What does React Query (TanStack Query) do?Junior
- 14What does SWR do?Junior
- 16Suspense and data fetchingMiddle
- 17What does useDeferredValue() do when working with asynchrony?Junior
- 18What does useTransition() do?Junior
- 19What is "startTransition()"?Junior
- 20Isolating API from UIJunior
- 21Client state VS server stateJunior
- 22What does "idempotent request" mean?Junior
- 1Error in a componentJunior
- 2Types of errors in a React applicationJunior
- 3Why does try...catch not catch errors inside JSX?Junior
- 4What is Error Boundary?Junior
- 6What types of errors does an Error Boundary catch?Junior
- 7async errors in useEffectJunior
- 8ErrorBoundary and SuspenseJunior
- 9Form validation errorsJunior
- 10Error loggingJunior
- 1What is SSR?Junior
- 2SSR vs CSRJunior
- 4Advantages of SSRJunior
- 5Disadvantages of SSRJunior
- 6In what types of projects is SSR especially useful?Junior
- 7Why can SSR improve SEO?Junior
- 8SSR and Time to First PaintMiddle
- 9What is hydration in the context of SSR?Junior
- 10HTML mismatchJunior
- 11What does the server do before sending HTML to the client?Middle
- 12What does middleware do in SSR?Junior
- 13JSON.stringify() and its dangerJunior
- 14What is streaming SSR and how does it work?Senior
- 16SSR and lazy loading of componentsJunior
- 17How does SSR work with SPA routing?Junior
- 18What does useLayoutEffect() do during SSR?Middle
- 19Context and SSRMiddle
- 20What are React Server Components (RSC)?Junior
- 1What's new in React 18?Junior
- 2Concurrent RenderingMiddle
- 4createRoot() vs render()Junior
- 5What is batching (Automatic Batching)?Junior
- 6setState in React 18Junior
- 7What does Suspense do in React 18?Junior
- 8Suspense and Data FetchingJunior
- 9What are "Transition Updates"?Middle
- 11What does startTransition() do?Junior
- 12Concurrent ModeMiddle
- 13Concurrent ModeMiddle
- 14What does the useId() hook do?Junior
- 15What does the useSyncExternalStore() hook do?Middle
- 16What does the useInsertionEffect() hook do?Middle
- 17What does useDeferredValue() doMiddle
- 19hydration in React 18Middle
- 20What is Fiber in the context of React 18?Middle
- 21What are React Server Components (RSC)?Junior
- 22Actions in React 19Junior
- 23What is useFormStatus?Junior
- 24What is useOptimisticJunior
- 25What's new about the use API (reading resources, Promise, etc.)?Junior
- 26Server Components in React 19Junior
- 1The importance of TS in modern applicationsJunior
- 2How does JSX differ from TSX?Junior
- 4How do you type state with useState()?Junior
- 5How do you type useRef()?Junior
- 6How do you type useMemo()?Junior
- 7How to type useCallback()?Junior
- 8How do you type event handlers?Junior
- 9How do you type context?Junior
- 10What is the React.ReactNode type for?Junior
- 1What is React and why is it needed?Junior
- 2Why is key needed in React?Middle
- 3Synthetic events in ReactMiddle
- 4Difference between functional and Class components in ReactJunior
- 6What is portal in ReactMiddle
- 7Immutability in React stateMiddle
- 8Lifting state up in ReactJunior
- 9useReducer vs useStateJunior
- 10Rules for using hooks in ReactMiddle
- 11component rendering order and hook calling in ReactMiddle
- 13What is the difference between useEffect and useLayoutEffect?Junior
- 14Refs in React (useRef, createref, forwardref)Middle
- 15Why useImperativeHandle is needed in ReactSenior
- 16What are custom hooks in ReactMiddle
- 17useReducer() vs useState()Junior
- 18component lifecycle methods in ReactMiddle
- 19Transparent reactivityJunior
- 20State management approaches in ReactMiddle
- 21Reasons for component re-rendering in ReactMiddle
- 22React fiber and virtual DOM update processSenior
- 23React.StrictModeMiddle
- 25How useMemo works and why is it neededMiddle
- 26What is the difference between useCallback and useMemo?Junior
- 27Commit Phase vs Render PhaseMiddle
- 28React.lazy And suspense — lazy components in ReactMiddle
- 29What is virtualization and why is it neededMiddle
- 30React performance optimization techniquesMiddle
- 32Feature-Sliced DesignJunior
- 33What is AbortController?Junior
- 34What is debounce?Junior
- 35useTransition and useDeferredValue in ReactSenior
- 36What is closure in js?Junior
- 37What is a pure Function?Junior
- 38What is memoization?Junior
- 39What are WeakMap, WeakSet, and WeakRef?Junior