Make setLayoutAnimationEnabledExperimental a no-op in Bridgeless (#48856)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48856

Refactor setLayoutAnimationEnabledExperimental in BridgelessUIManager.js to be a no-op in the new architecture

Changelog:
[Android][Fixed] - Make `setLayoutAnimationEnabledExperimental` a no-op in Bridgeless

Reviewed By: javache

Differential Revision: D68313694

fbshipit-source-id: 7a79fad72b1eeda5af3ff629a609d53e4f08f26d
This commit is contained in:
Arushi Kesarwani
2025-01-22 07:16:44 -08:00
committed by Facebook GitHub Bot
parent c8a387c2d1
commit 44da5d2ee0
@@ -182,14 +182,9 @@ const UIManagerJSPlatformAPIs = Platform.select({
return [];
},
setLayoutAnimationEnabledExperimental: (enabled: boolean): void => {
/**
* Layout animations are always enabled in the New Architecture.
* They cannot be turned off.
*/
if (!enabled) {
raiseSoftError(
'setLayoutAnimationEnabledExperimental(false)',
'Layout animations are always enabled in the New Architecture.',
if (__DEV__) {
console.warn(
'setLayoutAnimationEnabledExperimental is currently a no-op in the New Architecture.',
);
}
},