[flags] disableLegacyMode in native-fb (#35120)
this is failing test too because we need the legacy mode in the react package until we fix the tests
Ricky committed
Nov 12, 2025 at 15:38 UTC
bbe3f4d322846083c57009dbd6121900f120b389
3 files changed
+2
-10
packages/react-native-renderer/src/__tests__/ReactFabricAndNative-test.internal.js
-8
@@ -40,7 +40,6 @@ describe('created with ReactFabric called with ReactNative', () => {
40
require('react-native/Libraries/ReactPrivate/ReactNativePrivateInterface').getNativeTagFromPublicInstance;
41
});
42
43
- // @gate !disableLegacyMode
43
it('find Fabric instances with the RN renderer', () => {
44
const View = createReactNativeComponentClass('RCTView', () => ({
45
validAttributes: {title: true},
@@ -61,7 +60,6 @@ describe('created with ReactFabric called with ReactNative', () => {
60
expect(getNativeTagFromPublicInstance(instance)).toBe(2);
61
});
62
64
- // @gate !disableLegacyMode
63
it('find Fabric nodes with the RN renderer', () => {
64
const View = createReactNativeComponentClass('RCTView', () => ({
65
validAttributes: {title: true},
@@ -82,7 +80,6 @@ describe('created with ReactFabric called with ReactNative', () => {
80
expect(handle).toBe(2);
81
});
82
85
- // @gate !disableLegacyMode
83
it('dispatches commands on Fabric nodes with the RN renderer', () => {
84
nativeFabricUIManager.dispatchCommand.mockClear();
85
const View = createReactNativeComponentClass('RCTView', () => ({
@@ -104,7 +101,6 @@ describe('created with ReactFabric called with ReactNative', () => {
101
expect(UIManager.dispatchViewManagerCommand).not.toBeCalled();
102
});
103
107
- // @gate !disableLegacyMode
104
it('dispatches sendAccessibilityEvent on Fabric nodes with the RN renderer', () => {
105
nativeFabricUIManager.sendAccessibilityEvent.mockClear();
106
const View = createReactNativeComponentClass('RCTView', () => ({
@@ -147,7 +143,6 @@ describe('created with ReactNative called with ReactFabric', () => {
143
.ReactNativeViewConfigRegistry.register;
144
});
145
150
- // @gate !disableLegacyMode
146
it('find Paper instances with the Fabric renderer', () => {
147
const View = createReactNativeComponentClass('RCTView', () => ({
148
validAttributes: {title: true},
@@ -168,7 +163,6 @@ describe('created with ReactNative called with ReactFabric', () => {
163
expect(instance._nativeTag).toBe(3);
164
});
165
171
- // @gate !disableLegacyMode
166
it('find Paper nodes with the Fabric renderer', () => {
167
const View = createReactNativeComponentClass('RCTView', () => ({
168
validAttributes: {title: true},
@@ -189,7 +183,6 @@ describe('created with ReactNative called with ReactFabric', () => {
183
expect(handle).toBe(3);
184
});
185
192
- // @gate !disableLegacyMode
186
it('dispatches commands on Paper nodes with the Fabric renderer', () => {
187
UIManager.dispatchViewManagerCommand.mockReset();
188
const View = createReactNativeComponentClass('RCTView', () => ({
@@ -212,7 +205,6 @@ describe('created with ReactNative called with ReactFabric', () => {
205
expect(nativeFabricUIManager.dispatchCommand).not.toBeCalled();
206
});
207
215
- // @gate !disableLegacyMode
208
it('dispatches sendAccessibilityEvent on Paper nodes with the Fabric renderer', () => {
209
ReactNativePrivateInterface.legacySendAccessibilityEvent.mockReset();
210
const View = createReactNativeComponentClass('RCTView', () => ({
packages/shared/forks/ReactFeatureFlags.native-fb.js
+1
-1
@@ -36,7 +36,7 @@ export const disableCommentsAsDOMContainers: boolean = true;
36
export const disableInputAttributeSyncing: boolean = false;
37
export const disableLegacyContext: boolean = false;
38
export const disableLegacyContextForFunctionComponents: boolean = false;
39
-export const disableLegacyMode: boolean = true;
39
+export const disableLegacyMode: boolean = false;
40
export const disableSchedulerTimeoutInWorkLoop: boolean = false;
41
export const disableTextareaChildren: boolean = false;
42
export const enableAsyncDebugInfo: boolean = false;
packages/shared/forks/ReactFeatureFlags.native-oss.js
+1
-1
@@ -21,7 +21,7 @@ export const disableCommentsAsDOMContainers: boolean = true;
21
export const disableInputAttributeSyncing: boolean = false;
22
export const disableLegacyContext: boolean = true;
23
export const disableLegacyContextForFunctionComponents: boolean = true;
24
-export const disableLegacyMode: boolean = true;
24
+export const disableLegacyMode: boolean = false;
25
export const disableSchedulerTimeoutInWorkLoop: boolean = false;
26
export const disableTextareaChildren: boolean = false;
27
export const enableAsyncDebugInfo: boolean = false;