geekskai Logogeekskai
ToolsBlogPricing
Sign in
Sign in
ToolsBlogSign in
Sunday, January 11, 2026|10min read

React Rendering & Performance Interview Questions 2026

Authors
  • avatar
    Name
    Geeks Kai
    Twitter
    @KaiGeeks
Discuss on Twitter • View on GitHub

Tags

ReactReact-JS-Interview-QuestionsReact.js-Interview-QuestionsJavaScript-Interview-QuestionsReact-Interview-QuestionsFrontend-Interview

Previous Article

React Router Interview Questions & Answers 2026

Next Article

React Redux Interview Questions & Answers 2026
← Back to the blog
geekskai Logo
geekskai

Public tools for developers and creators, plus optional Geekskai Audio Toolkit plans. Built with care.

Popular Tools

SoundCloud DownloaderSoundCloud to MP3SoundCloud to WAVSoundCloud PlaylistSoundCloud Artwork
View All Tools

Resources

BlogAbout MePricingTagsProjectsPrivacy PolicyTerms of ServiceRefund Policy

Connect With Us

mailMail
githubGitHub
twitterTwitter
linkedinLinkedin
© 2026 geekskai • All rights reserved
React Interview Questions & Answers

📖 Introduction

These eight React performance questions distinguish a component render, a DOM commit and measured browser work. The memo and lazy-loading examples explain what to verify before making a performance claim, including updates from state and Context.

Jump to a question (8 questions)
  1. Can you explain what the Virtual DOM is and how React uses it?
  2. What do you understand by reconciliation in React? Why is it important?
  3. How does React.memo help improve performance?
  4. If I ask you to optimize a slow React application, what techniques would you use?
  5. What do you mean by code splitting and lazy loading in React?
  6. What is the difference between React.PureComponent and React.Component?
  7. How does React handle re-rendering when state or props change?
  8. How do useMemo and useCallback help improve performance in React?

React Rendering & Performance

Version scope: React 19.3.0, with manual memoization examples and no React Compiler transform assumed. Local DOM fixtures check behavior, not real-browser paint timing, bundle size, or a guaranteed performance gain. Complete modules are labeled by filename.

  1. Can you explain what the Virtual DOM is and how React uses it?

    React elements describe the intended UI. During render, React calls components to calculate that description; during commit, it applies the resulting host changes, such as DOM updates. Calling a component is different from changing the DOM.

    "Virtual DOM" is useful shorthand for this representation and comparison process, not a guarantee of globally minimal mutations or of being faster than every direct DOM implementation. Performance depends on the actual workload and what the browser must lay out, paint, and execute.

  2. What do you understand by reconciliation in React? Why is it important?

    Reconciliation matches the next rendered tree to the previous tree. Element type, position, and keys help React decide which component instances and state to preserve. A changed type or key can intentionally reset state.

    React can render components while leaving unchanged DOM nodes intact during commit. Do not use "reconciliation" to mean that components never rerender, or promise a globally optimal diff. Use stable keys from records when items can move, and verify the resulting state and DOM behavior.

  3. How does React.memo help improve performance?

    memo lets React skip some parent-driven work when props compare equal. By default, it compares each prop with Object.is; a newly created object or function is a different reference. A custom comparator must cover every prop that affects output or behavior.

    It remains a performance optimization, not a promise that the component will never render. The child's own state and consumed Context can still update it. This complete example keeps a stable label while exposing both of those update paths:

    // file: memo-example.jsx
    import { createContext, memo, useContext, useState } from "react"
    
    export const ThemeContext = createContext("light")
    
    export const MemoChild = memo(function MemoChild({ label }) {
      const theme = useContext(ThemeContext)
      const [count, setCount] = useState(0)
      return (
        <button onClick={() => setCount(previousCount => previousCount + 1)}>
          {label}: {theme}: {count}
        </button>
      )
    })
    
    export function MemoExample() {
      const [parentCount, setParentCount] = useState(0)
      const [theme, setTheme] = useState("light")
      function toggleTheme() {
        setTheme(previousTheme => previousTheme === "light" ? "dark" : "light")
      }
      return (
        <ThemeContext.Provider value={theme}>
          <button onClick={() => setParentCount(previousCount => previousCount + 1)}>Update parent</button>
          <output>Parent: {parentCount}</output>
          <button onClick={toggleTheme}>Toggle theme</button>
          <MemoChild label="Child" />
        </ThemeContext.Provider>
      )
    }
    

    Updating the parent does not change the child label. Clicking Child changes its own state, and Toggle theme changes its Context. Confirm those visible results; do not turn a particular development render count into a universal performance guarantee.

  4. If I ask you to optimize a slow React application, what techniques would you use?

    Start with a reproducible slow interaction, representative inputs, and a measurement. Use React DevTools profiling for component commits and browser performance tools for scripting, layout, paint, and network work. Compare the same interaction after one targeted change.

    • Keep transient state close to its consumers and avoid unnecessary Effect-driven update chains.
    • Split code or routes when the initial bundle is the bottleneck.
    • Consider list virtualization when rendering too many rows is the actual cost.
    • Use memoization where expensive repeated work and stable dependencies make it useful.
    • Use stable record keys, and choose request caching or deduplication when repeated network work is the problem.

    An inline callback is not automatically a performance bug. Wrapping every function in useCallback adds complexity without ensuring a benefit. React Compiler can change the need for manual caching when enabled; performance conclusions still need the chosen application and build configuration.

  5. What do you mean by code splitting and lazy loading in React?

    Code splitting lets a bundler create separately loadable code. lazy loads a component definition on demand, and Suspense shows a fallback while it is pending. The imported module must resolve with a default component; a named export can be adapted deliberately.

    Save these two complete modules together in a React project that supports dynamic imports:

    // file: lazy-app.jsx
    import { lazy, Suspense } from "react"
    
    const LazyPanel = lazy(() => import("./LazyPanel"))
    
    export default function LazyApp() {
      return (
        <Suspense fallback={<p>Loading panel...</p>}>
          <LazyPanel />
        </Suspense>
      )
    }
    
    // file: LazyPanel.jsx
    export default function LazyPanel() {
      return <p>Panel ready</p>
    }
    

    Suspense handles the pending load, not every rejected request or arbitrary Promise created in an Effect. A failed module load needs an Error Boundary or framework error handling. A DOM fixture can verify fallback and resolved content; inspect the real bundler output and network requests before claiming smaller initial downloads or faster loading.

  6. What is the difference between React.PureComponent and React.Component?

    Component and PureComponent both support class components. Component has no default shallow props/state comparison, although shouldComponentUpdate and other React behavior can affect whether work proceeds. It is inaccurate to promise that every setState call always produces a render and a DOM change.

    PureComponent supplies a shallow props/state comparison. Mutating an existing object can therefore hide a change; update objects immutably. A consumed Context can still update a consumer. For new function components, memo is the related optimization tool, with its own state/Context and comparison boundaries.

  7. How does React handle re-rendering when state or props change?

    A state setter requests an update; it does not change the state snapshot already captured by the current render. React may skip work when the next state compares equal with Object.is. Normal parent rendering can also call a child even when its props look unchanged, unless an applicable optimization skips that work.

    When React renders, it calculates the next UI. Commit then applies the required host changes. Neither "a component rendered" nor "a state setter was called" proves that the browser changed every DOM node. Use immutable updates and functional updaters when the next state depends on previous state.

  8. How do useMemo and useCallback help improve performance in React?

    useMemo caches a calculation result; useCallback caches the function reference React returns. Both compare their declared dependencies with Object.is, and both require complete reactive inputs. useCallback does not stop the function expression itself from being created.

    These caches are optimizations that React may discard. They do not establish durable storage, make impure code correct, or directly prevent all child rendering. Start with correct code, measure the expensive path, and then choose the smallest useful optimization.

Official references

  • Render and commit
  • memo and PureComponent
  • lazy and Suspense
  • useMemo and useCallback

📚 Related React Interview Questions

Continue your React JS interview questions preparation with these related topics:

Core React Interview Questions

Master Core React interview questions covering JSX, Virtual DOM, Components, Props, State, and more. Essential React JS ...

React Hooks Interview Questions

Comprehensive React Hooks interview questions covering useState, useEffect, useCallback, useMemo, useReducer, and custom...

React State Management Interview Questions

Master React State Management interview questions covering useState, Context API, Redux, and state optimization. Essenti...

📖

Complete React Interview Guide

Master all aspects of React development

This article is part of our comprehensive React JS interview questions series covering all aspects of React development. Explore all topics:

Core React
Arrays & Lists
Forms & Events
React Hooks
Internationalization
Libraries & Integration
Miscellaneous
React Redux
Rendering & Performance
React Router
State Management
React Testing