React Daily: FragmentInstance Event Listener Fix

A critical memory leak in React's FragmentInstance event handling was fixed today, resolving an issue where event listeners weren't properly removed when capture options were specified in different formats.

Duration: PT2M2S

Episode overview

This episode is a short developer briefing from React Daily.

It explains recent repository work in plain language.

  • Show: React Daily
  • Published: 2026-04-22T00:00:00Z
  • Audio duration: PT2M2S

Transcript excerpt

This excerpt keeps the crawler page concise. Listen to the episode or use the RSS feed for the full update.

Good morning, this is React Daily for April 22nd, 2026.

Dhakshin2007 merged pull request 36047, fixing a FragmentInstance listener leak that normalized boolean versus object capture options per DOM spec. The issue occurred when event listeners were added with one format - such as addEventListener with a boolean capture parameter - but removed with another format using an…

The root cause was in ReactFiberConfigDOM.js, where the normalizeListenerOptions function generated different key strings for deduplication depending on whether capture options were passed as booleans or objects. Boolean parameters produced keys like "c=1" while object parameters generated "c=1&o=0&p=0". Since these…

The fix normalizes the boolean branch to produce the same full key format as the object branch, ensuring both addEventListener and removeEventListener calls can properly match listeners regardless of option format. This brings React's behavior in line with DOM specifications.

The bug has existed since FragmentInstance event listener tracking was first implemented, but only became reachable in production three days ago when enableFragmentRefs and enableFragmentRefsInstanceHandles were enabled across all…

W…

Nearby episodes from React Daily

  1. Infinite Render Loop Detection Enhancement
  2. Meta Flight Server Integration
  3. Weekly Recap - DOM Standards & Fragment Fixes
  4. Code Formatting Fix
  5. iframe credentialless Attribute Casing Fix
  6. iframe Security Enhancement
  7. Weekly Recap - Legacy Cleanup and Stability Improvements
  8. Weekly Recap - Infrastructure Stability and Build System Fixes