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
(cherry picked from commit 31d33ce91b)
This commit is contained in:
Rubén Norte authored and Fabrizio Cucci committed 2026-09-14 10:15:15 +01:00
1 parent 0b0ce740cb
commit 760b5daf5f
2 files changed
+3 -4

No files matched your search

@@ -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:
@@ -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<<d9d665005b8706625e48e615f44af4b8>>
* @generated SignedSource<<51d7012509e3e0f2fe1caef5dc1060a0>>
* @flow strict
* @noformat
*/
@@ -175,7 +175,7 @@ export const enableImperativeEvents: Getter<boolean> = 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<boolean> = createJavaScriptFlagGetter('enableNativeEventTargetEventDispatching', false);
export const enableNativeEventTargetEventDispatching: Getter<boolean> = createJavaScriptFlagGetter('enableNativeEventTargetEventDispatching', true);
/**
* Enable the external inspection API for DevTools to communicate with the Inspector overlay.