Skip to content

Commit ef3ab48

Browse files
rubennortefacebook-github-bot
authored andcommitted
Ship enableNativeEventTargetEventDispatching by default (#58450)
Summary: The renderer can dispatch events either through the legacy plugin-based system or through the W3C EventTarget API (addEventListener/dispatchEvent), gated behind the enableNativeEventTargetEventDispatching feature flag. Enabling it by default was previously blocked on the renderer, which did not carry the necessary changes until React 19.3.0. That sync has now landed, so flip the flag's default value to true and drop the TODO that tracked the blocker. Fully removing the flag and the legacy dispatch path is left for a follow-up. Changelog: [General][Changed] - Enabled Web-based event dispatching refactor Reviewed By: javache Differential Revision: D119495069
1 parent 744d32b commit ef3ab48

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1033,9 +1033,8 @@ const definitions: FeatureFlagDefinitions = {
10331033
// TODO: This should be "canary" now but the OSS renderer cannot be upgraded with the necessary changes until React 19.3.0 is released.
10341034
ossReleaseStage: 'none',
10351035
},
1036-
// TODO: This feature flag should be shipped and clean up now, but the OSS renderer cannot be upgraded with the necessary changes until React 19.3.0 is released.
10371036
enableNativeEventTargetEventDispatching: {
1038-
defaultValue: false,
1037+
defaultValue: true,
10391038
metadata: {
10401039
dateAdded: '2026-04-13',
10411040
description:

packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<d9d665005b8706625e48e615f44af4b8>>
7+
* @generated SignedSource<<51d7012509e3e0f2fe1caef5dc1060a0>>
88
* @flow strict
99
* @noformat
1010
*/
@@ -175,7 +175,7 @@ export const enableImperativeEvents: Getter<boolean> = createJavaScriptFlagGette
175175
/**
176176
* When enabled, the React Native renderer dispatches events through the W3C EventTarget API (addEventListener/dispatchEvent) instead of the legacy plugin-based system.
177177
*/
178-
export const enableNativeEventTargetEventDispatching: Getter<boolean> = createJavaScriptFlagGetter('enableNativeEventTargetEventDispatching', false);
178+
export const enableNativeEventTargetEventDispatching: Getter<boolean> = createJavaScriptFlagGetter('enableNativeEventTargetEventDispatching', true);
179179

180180
/**
181181
* Enable the external inspection API for DevTools to communicate with the Inspector overlay.

0 commit comments

Comments
 (0)