Skip to content

Commit 1ef094e

Browse files
sammy-SCfacebook-github-bot
authored andcommitted
use C++ Native Animated from JS if enabled
Summary: changelog: [internal] When C++ Native Animated is used, we can't be using TurboModuleAnimated native module. This diff just add the check to make sure that if C++ Native Animated is used, it will be correctly referenced from JS. Differential Revision: D74490166
1 parent 14a60aa commit 1ef094e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/react-native/Libraries/Animated/shouldUseTurboAnimatedModule.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,15 @@
88
* @format
99
*/
1010

11+
import * as ReactNativeFeatureFlags from '../../src/private/featureflags/ReactNativeFeatureFlags';
1112
import Platform from '../Utilities/Platform';
1213

1314
function shouldUseTurboAnimatedModule(): boolean {
14-
return Platform.OS === 'ios' && global.RN$Bridgeless === true;
15+
if (ReactNativeFeatureFlags.cxxNativeAnimatedEnabled()) {
16+
return false;
17+
} else {
18+
return Platform.OS === 'ios' && global.RN$Bridgeless === true;
19+
}
1520
}
1621

1722
export default shouldUseTurboAnimatedModule;

0 commit comments

Comments
 (0)