From 31d33ce91b127b434228c8d912810563afdede54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Norte?= Date: Thu, 10 Sep 2026 17:03:25 -0700 Subject: [PATCH] Ship enableNativeEventTargetEventDispatching by default (#58450) Summary: Pull Request resolved: https://github.com/react/react-native/pull/58450 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 fbshipit-source-id: 53ad5b88c8b5cdd11c3fd1ee27d0f147b83c41a9 --- .../scripts/featureflags/ReactNativeFeatureFlags.config.js | 3 +-- .../src/private/featureflags/ReactNativeFeatureFlags.js | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js b/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js index 2166f296602..0cc13465858 100644 --- a/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js +++ b/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js @@ -1033,9 +1033,8 @@ const definitions: FeatureFlagDefinitions = { // TODO: This should be "canary" now but the OSS renderer cannot be upgraded with the necessary changes until React 19.3.0 is released. ossReleaseStage: 'none', }, - // 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. enableNativeEventTargetEventDispatching: { - defaultValue: false, + defaultValue: true, metadata: { dateAdded: '2026-04-13', description: diff --git a/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js b/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js index e9e97cc712a..dc800cc0bf0 100644 --- a/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js +++ b/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<<51d7012509e3e0f2fe1caef5dc1060a0>> * @flow strict * @noformat */ @@ -175,7 +175,7 @@ export const enableImperativeEvents: Getter = createJavaScriptFlagGette /** * When enabled, the React Native renderer dispatches events through the W3C EventTarget API (addEventListener/dispatchEvent) instead of the legacy plugin-based system. */ -export const enableNativeEventTargetEventDispatching: Getter = createJavaScriptFlagGetter('enableNativeEventTargetEventDispatching', false); +export const enableNativeEventTargetEventDispatching: Getter = createJavaScriptFlagGetter('enableNativeEventTargetEventDispatching', true); /** * Enable the external inspection API for DevTools to communicate with the Inspector overlay.