Skip to content

Remove enableDirectEventsInEventTarget feature flag (#57528)#57528

Open
rubennorte wants to merge 2 commits into
react:mainfrom
rubennorte:export-D111695476
Open

Remove enableDirectEventsInEventTarget feature flag (#57528)#57528
rubennorte wants to merge 2 commits into
react:mainfrom
rubennorte:export-D111695476

Conversation

@rubennorte

@rubennorte rubennorte commented Jul 13, 2026

Copy link
Copy Markdown
Member

Summary:

Cleans up the enableDirectEventsInEventTarget JS feature flag and inlines its usages as true. Direct events (those that neither bubble nor capture, such as onLayout) now always take the fast target-only dispatch path when EventTarget-based event dispatching is enabled, without a separate gate.

  • Removed the flag definition and regenerated the feature flags.
  • Inlined the flag in dispatchNativeEvent so rnIsDirect is derived directly from the event config.
  • Updated integration/benchmark tests: dropped the flag pragmas, made the fast-path test always run, and removed the now-dead legacy-path test.

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D111695476

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 13, 2026
@meta-codesync

meta-codesync Bot commented Jul 13, 2026

Copy link
Copy Markdown

@rubennorte has exported this pull request. If you are a Meta employee, you can view the originating Diff in D111695476.

@meta-codesync meta-codesync Bot changed the title Remove enableDirectEventsInEventTarget feature flag Remove enableDirectEventsInEventTarget feature flag (#57528) Jul 13, 2026
rubennorte added a commit to rubennorte/react-native that referenced this pull request Jul 13, 2026
Summary:

Cleans up the `enableDirectEventsInEventTarget` JS feature flag and inlines its usages as `true`. Direct events (those that neither bubble nor capture, such as `onLayout`) now always take the fast target-only dispatch path when EventTarget-based event dispatching is enabled, without a separate gate.

- Removed the flag definition and regenerated the feature flags.
- Inlined the flag in `dispatchNativeEvent` so `rnIsDirect` is derived directly from the event config.
- Updated integration/benchmark tests: dropped the flag pragmas, made the fast-path test always run, and removed the now-dead legacy-path test.

Changelog:
[Internal]

Differential Revision: D111695476
…react#57527)

Summary:

Add TODO comments to the `enableImperativeEvents` and `enableNativeEventTargetEventDispatching` feature flags explaining why they haven't progressed yet (the OSS renderer cannot be upgraded with the necessary changes until React 19.3.0 is released).

This is a comment-only change with no functional impact.

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D111695477
Summary:

Cleans up the `enableDirectEventsInEventTarget` JS feature flag and inlines its usages as `true`. Direct events (those that neither bubble nor capture, such as `onLayout`) now always take the fast target-only dispatch path when EventTarget-based event dispatching is enabled, without a separate gate.

- Removed the flag definition and regenerated the feature flags.
- Inlined the flag in `dispatchNativeEvent` so `rnIsDirect` is derived directly from the event config.
- Updated integration/benchmark tests: dropped the flag pragmas, made the fast-path test always run, and removed the now-dead legacy-path test.

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D111695476
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant