MSK Institute LogoMSK.Institute
HomeCourses
Book Free Demo➔Sign In
Free Demo➔
MSK Institute LogoMSK.Institute

Leading computer training academy in Shikohabad for software engineering, Python, web development, and digital literacy.

ISO 9001:2015 Certified Center
Follow & Connect
4.9

Programs & Admissions

  • All CoursesCatalog
  • Learning PathsRoadmaps
  • Student ProjectsShowcase
  • Live Classes & ScheduleLive
  • Upcoming Batches
  • Campuses & LocationsHub
  • Verify Certificates
  • Book Free Demo Class

Resources & Tools

  • Free Online Mock TestsAll Tests
  • NIELIT CCC Mock TestFree
  • Course & Career FinderQuiz
  • Study Material Hub
  • All MSK ToolsHub
  • Keyboard ShortcutsNew
  • TypeQuest Speed LabTyping
  • MSK Code PlaygroundCode
  • Interactive Tutorials
  • Quick Cheatsheets

Institute & Contact

  • About MSK Institute
  • Careers & InternshipsHiring
  • Publications & Blogs
  • Gali No. 3, Near Gyan Jyoti Public School,
    Adarsh Nagar, Shikohabad, Uttar Pradesh 283135
  • +91 83930 42166
  • mskshikohabad@gmail.com
  • Hours:Mon – Sat: 8:00 AM – 7:00 PM | Sun: 10:00 AM – 2:00 PM
  • 4.9 ★(38 Google Reviews)
© 2026 MSK Institute. All rights reserved.•Privacy Policy•Terms of Service•Disclaimer•Contact Us

Shikohabad's Leading Computer & Coding Academy

Home
Courses
Live
Material
React Re-render Rules and Profiling Bottlenecks0%
Study Materials
React.js for IntermediateProgress 0%
1.1Component Reusability and Polymorphic Components1.2Render Props Pattern in Modern React1.3Higher-Order Components vs Modern Hooks1.4Compound Components Pattern Explained
8.1React Re-render Rules and Profiling Bottlenecks8.2Memoizing Components with React memo8.3The useCallback Hook and Stabilizing Callback Props8.4The useMemo Hook and Expensive Computations
HomeTutorialsReact.js for IntermediateReact Re-render Rules and Profiling Bottlenecks
Memoizing Components with React memo

React Re-render Rules and Profiling Bottlenecks

Beginner12 min read•Updated: 2026-11-18•By Er. Sumit Kumar (MSK Institute)
Study MaterialsCheatsheet

1. Demystifying When React Re-renders

A pervasive myth among beginner and intermediate React developers is that components only re-render when their props change. This is completely false.

In standard React:

Whenever a component re-renders, React automatically re-renders ALL of its child components recursively, regardless of whether their props changed!
1Parent Component State Updates:
2[Parent Re-renders]
3 │
4 ├──► [Child 1 Re-renders!] (Props didn't change!)
5 │
6 └──► [Child 2 Re-renders!] (Props didn't change!)

2. The 4 Triggers of a Re-render

A component re-renders if and only if one of four events occurs:

  1. 1
    Local State Update: The component calls its own useState or useReducer updater function.
  2. 2
    Parent Component Re-render: The parent component re-renders (triggering an automatic downward cascade).
  3. 3
    Context Consumption: A React Context that the component subscribes to via useContext changes its value.
  4. 4
    Hook Update: A custom hook called inside the component triggers a state update.

3. Re-rendering vs DOM Updating

Engineers often panic when they see re-renders in DevTools, confusing a Virtual DOM re-render with a real DOM mutation.

  • Re-rendering: Executing the component function in memory to produce a new Virtual DOM tree. In modern JavaScript engines, this calculation is measured in microseconds and is extremely cheap.
  • Reconciliation & DOM Painting: Modifying physical DOM nodes on screen. React's diffing engine ensures that even if a component re-renders, the real browser DOM is only touched if the calculated output actually changed!

Re-renders only become a performance problem when:

  • Components perform expensive computations (e.g. large mathematical matrix operations, sorting 10,000 items).
  • Huge subtrees (hundreds of components) re-render on high-frequency events like typing or scrolling.

4. Profiling Bottlenecks with React DevTools

Never optimize blindly! Use the React DevTools Profiler to identify genuine bottlenecks:

  1. 1
    Open DevTools -> Profiler tab.
  2. 2
    Click Record (blue circle).
  3. 3
    Interact with the application (e.g. type in a search box).
  4. 4
    Click Stop.
  5. 5
    Examine the Ranked Chart:
  • Components are ordered by the amount of time they took to render.
  • Look for wide, yellow, or red bars (components taking >16ms, dropping 60fps frames).
  • Inspect "Why did this render?" to discover the root cause.

Interactive Quiz• Knowledge Check

Practice Quiz

Question 1
In standard React, what happens to child components when their parent component re-renders?
Question 2
What is the difference between a component "re-rendering" and React "updating the DOM"?
Question 3
How many milliseconds does a render have before it drops below 60 frames per second (causing visible UI lag)?
Question 4
Which tool should you use to measure exactly which components re-rendered and how long each render took?
Question 5
Which of the following does NOT cause a component to re-render?
Next Lesson

Memoizing Components with React memo

Continue learning with hands-on practice, examples, and exercises in the upcoming topic.

Related Lessons

Previous LessonNext Lesson
Managing Pagination, Caching, and Background RefetchMemoizing Components with React memo

Practice Quiz

Test your understanding of this lesson with 5 questions. Each question has one correct answer.

Mentor-Led Practical Training

Master React.js for Intermediate with Hands-On Projects

Practice in live mentor-led sessions with real projects, mock tests, and verifiable certification at MSK Institute.

View Full CourseBook Free Demo
PreviousNext
PreviousPrevNext