Skip to content

[flags] clean up enableUseEffectEventHook#366

Closed
everettbu wants to merge 1 commit into
mainfrom
rh/ff-event-effect
Closed

[flags] clean up enableUseEffectEventHook#366
everettbu wants to merge 1 commit into
mainfrom
rh/ff-event-effect

Conversation

@everettbu

Copy link
Copy Markdown

Mirror of facebook/react#35541
Original author: rickhanlonii


This is landed everywhere

@everettbu everettbu added CLA Signed React Core Team Opened by a member of the React Core Team labels Jan 16, 2026
@greptile-apps

greptile-apps Bot commented Jan 16, 2026

Copy link
Copy Markdown

Greptile Summary

This PR removes the enableUseEffectEventHook feature flag, which was set to true everywhere, making useEffectEvent a permanently enabled feature in React. The changes are consistent across all affected files:

  • Removed flag definition from all feature flag files (main and platform-specific forks)
  • Updated Dispatcher type to make useEffectEvent non-optional
  • Removed conditional checks and directly added useEffectEvent to all dispatcher objects
  • Removed @gate enableUseEffectEventHook annotations from tests
  • Simplified code in ReactFiberCommitWork.js and ReactFiberFlags.js by removing nested conditionals

This is a standard feature flag cleanup with no functional changes since the flag was already true everywhere.

Confidence Score: 5/5

  • Safe to merge - straightforward feature flag cleanup with no functional changes
  • This is a mechanical refactoring that removes a feature flag that was already enabled everywhere. All changes follow the same pattern: remove the flag import/definition, remove conditional checks, and make the feature permanently available. The changes are consistent across all files and don't alter runtime behavior.
  • No files require special attention

Important Files Changed

Filename Overview
packages/shared/ReactFeatureFlags.js Removed enableUseEffectEventHook flag definition (was set to true)
packages/react-reconciler/src/ReactInternalTypes.js Changed useEffectEvent from optional to required in Dispatcher type, removed outdated TODO comment
packages/react-reconciler/src/ReactFiberCommitWork.js Removed enableUseEffectEventHook import and flag check, now always processes event payloads
packages/react-reconciler/src/ReactFiberHooks.js Removed enableUseEffectEventHook import and conditionals, added useEffectEvent directly to all dispatcher objects

@everettbu

Copy link
Copy Markdown
Author

Upstream PR was closed or merged. Code is synced via branch mirror.

@everettbu everettbu closed this Jan 17, 2026
@everettbu everettbu deleted the rh/ff-event-effect branch January 17, 2026 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed React Core Team Opened by a member of the React Core Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants